I have more than 1000 objects in one library need to segregate type wise.

10 pts.
Tags:
AS/400 Library
AS/400 objects
CL Program
I have more than 1000 objects in one library need to segregate type wise like Program, Report, CL, Display Screens & also we write some Report Programs in RPG.[o:p][/o:p]

Anyone have idea to segregate objects without any manual efforts.[o:p][/o:p]

Answer Wiki

Thanks. We'll let you know when a new response is added.

First get a list of all objects in the library.
DSPOBJD OBJ(?Yourlib/*ALL) OBJTYPE(*ALL)
OUTPUT(*OUTFILE) OUTFILE(QTEMP/YOURFILE)
This will create a file with files that you can use to do the moves for you.
Once you determine some logic to make the decision as to where to move what,
Write a CL program to read this file and execute the logic.
Fields you would probably look at would be:
ODOBNM Object Name
ODOBTP Object type
ODOBAT Object attribute
ODOBTX Text description
You may have to use substring to look for selected values.
There may be more fields you want to use depending on your circumstances.
*
You can code and run your program in steps. Do the most common first, then code the more specific checks.
***
If this was a repeatable process and I had to use it over many libraries or machines, I would do as described above.
If this is a one shot deal, I would use WRKOBJPDM and do it manually.
Either way, you need to define the rules.
With PDM I can use F17 to get a subset of the objects in a library.
Then put ’11’ on the OPT line for the first one and do F13
I would then review the list and removed any ’11’ options for objects that I did not want to move to the specified library.
ENTER will let you put in the targe library name
ENTER and those are all done.
Change your subset with F17 and go again.
This gives you an option for visual verificatiion and saves the time for coding and TESTING you new throw away program.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    ...need to segregate type wise... What does that mean? Are you wanting to create separate lists of objects by type and attribute? Do you want to actually move or copy objects into different (new) libraries so that each library contains a particular "type" of object? What result are you hoping to end up with? Tom
    125,585 pointsBadges:
    report
  • MKamil1
    [...] 8. CharlieBrowne and TomLiotta help out a member who needs to segregate more than 1000 objects in one library. [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following