Does it have to be into a file? You can retrieve the libl with the RTVJOBA command and parse out the individual libraries.
Just an idea. Good luck.
Use QWDRJOBD (google it and look for the publib.boulder.ibm.com url's).
To extract library list you need to extract the entire length of data available
Offset to initial library list
Number of libraries in initial library list
ARRAY (*) of CHAR(11)
Initial library list
File is best as it will end up in excel for analysis of the many, many jobds.
I did finally find an example on the web (might be one of cozzi's).
I have downloaded the source and will see what I get out of it!
Sorry full solution would be:
Create file for library list data.
Create program that lists all jobd's on system into a userspace, then cycle through the entries in the userspace and retrieve the library list and other data of the jobd, an write a record for each into the file.