Retreving source file names of a library

270 pts.
Tags:
CLLE
iSeries V5R4MO
Hi guys, I need to copy all the objects(both DB file and PGM) from a library to another library except the source file(PF-SRC). I tried DSPFD FILE([file library]/*ALL) TYPE(*BASATR) OUTPUT(*OUTFILE) OUTFILE([outfile library]/[outfile]) then selecting those records where ATDTAT = ā€˜Sā€™. But the outfile consists of only DB files. But I need RPGLE/CLLE program names also. Is there any command or steps to copy objects of a library excluding their source file ?

Software/Hardware used:
i series V5R4M0

Answer Wiki

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

Discuss This Question: 1  Reply

 
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
    But the outfile consists of only DB files.   Then there are no source files in that library. (Or you don't have sufficient authority.)   That's not unusual. The source files usually should be in a different library.   But i need rpgle/clle program names also.   Since programs aren't files, you won't get a list of program names by requesting a list of files descriptions. You'll only get a list of file descriptions. If you want a list of program names, use the DSPOBJD command with OBJTYPE(*PGM) specified. Specify OBJTYPE(*PGM *FILE) to get a list of programs plus files.   One snag with DSPOBJD is that it doesn't show a difference between data files and source files. You could use your DSPFD command to have a list of files that identifies any that are source files. A SQL DELETE statement can then delete all records from your list of objects that match records in your list of files that are source files.   Actually, I would probably go in a different direction. I would simply use CPYLIB to copy the whole library, and then I'd delete any source files that made it into the new library.   Is there any command or steps to copy objects of a library excluding their source file ?   No command that I'm aware of. One could be created reasonably easily, but there's not enough widespread demand to have one generally available. (I've never heard of anyone wanting such a function before.) The steps would be based on the commands I mentioned above.   Tom
    125,585 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