Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Change Object owner

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Change Object owner

    The first step is to get a list of all of the objects in the library into a file. This can be accomplished as follows: DSPOBJD OBJ(LIBRARY/*ALL) OBJTYPE(*ALL) OUTPUT(*OUTFILE) OUTFILE(OUTLIB/outfile) Then you write a CL program to read through each of the records in the file and issue a chgobjown for each. Good luck.

  • #2
    Change Object owner

    John, I think the easiest way to change the ownership of all objects in a library is to use the CHGOWN command with a generic object name. Like this: CHGOWN OBJ('/qsys.lib/mylib.lib/*') NEWOWN(xxxx) Ed Fishel

    Comment


    • #3
      Change Object owner

      We are migrating to the AS400 from another platform. Our developers are working with both the program and data objects on the development machine. Our management doesn't want the developers to be the owners of any objects once in production. Is there a way to change the owner on all objects in a library without doing them one by one. Thanks in advance.

      Comment


      • #4
        Change Object owner

        Ed, Thanks for the tip. Prior to the introduction of the CHGOWN command, the method I posted was the only way to accomplish the change. Looks like I am going to have to start to pay more attention to the capabilities of the new commands!

        Comment


        • #5
          Change Object owner

          > DSPOBJD OBJ(LIBRARY/*ALL) OBJTYPE(*ALL) OUTPUT(*OUTFILE) OUTFILE(OUTLIB/outfile) > > Then you write a CL program to read through each of the records in the file and issue a chgobjown for each. It's much easier to use PDM for this sort of thing. WrkObjPDM on the library you wish to change the objects. Create a PDM option (XO) and define it like this: ChgObjOwn obj(&l/&n) objtype(&t) newown(...) curownaut(...) Specify the NewOwn and CurOwnAut values as appropriate. Then place the XO option on the first object, and F13 to replicate this to the end of the list and then hit Enter. Bill

          Comment

          Working...
          X