You could use something like this
Capture the filenames to an out fileusing this command
DSPOBJD OBJ(SOMELIB/*ALL) OBJTYPE(*FILE) OUTPUT(*OUTFILE) OUTFILE(YOURLIB/OUTFILENM)
Then read this outfile and use the CPYTOIMPF command
I know, I know - some people hate using this command
I have probably been lucky
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
‘If you're going through hell, keep going.’
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of jmurfitt@xxxxxxxxxx
Sent: Thursday, April 24, 2014 2:46 PM
Subject: Fwd: re: converting a library to .CSV
The question is how can this be done?
Disclaimer: This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.