Is it possible to generate a list of all source members within an iSeries source file using SQL?
Might be similar to getting table definitions from SYSTABLES and SYSCOLUMNS, but I’m unable to find anything so far.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Sadly SQL doesn’t know anything about members, so all the sourcefile-info you could get from qsys2.syscolumns is, that they consist of three columns.
you want the member info and i suggest using the qshell( STRQSH ) together with a query to qsys2.systables as source files are specially marked there.
i whacked together a qshell one-liner for copy&paste purposes ..
it pipes every member it finds to the IFS directory /home/myuser/myfile you could also specify a Sourcefile member. feel free to modify to your needs.
PS: it throws errors for Sourcefiles directly sitting in /QSYS.LIB, but i think you don’t want those anyway..
take care! 🙂