Hello. I'm trying to write a program that will tell me how many lines of source code reside on our system. I figured out the first couple of steps, but it just gets more and more confusing along the way, and I really think there's gotta be a better way to get the information i need. So far, this is what I have come up with:
1. Get a list of all libraries in QSYS and put in an outfile.
2. Using the above output file, create a new one holding those records where the ODCRTS, Created on system, matches the system name from RTVNETA.
3. Read the output file from step 2 and for each library name value held in ODOBNM, Object name, do a DSPOBJD to get all *FILEs. Output to yet another file.
4. Once all library names are processed and the 3rd file is created, do a CPYF over the new one from step 3 and select records where the source file, source lib, and source member, (ODSRCF, ODSRCL, ODSRCM), are blank.
5. That should hold the source physical file names in all libraries.
From there, since I never was able to write the process of step 4 because of mass confusion, I thought that i'd have to read that file, and for every record, take the value in the object name which would be QRPGLESRC, and the library name, ERIC01, and copy the data into 1 main output file, and keep adding records. I could break on the library name which seems like a good idea, and call an RPGLE. There I'd read each record in that file and count the number of records, outputting the count amount, library name, and source pf name to a main output file that will eventually get reported off of.
1. Is there an easier way to retrieve a list of all Source Physical Files held in the system?
2. Is there any easier way to do what i need to do without creating a TON of output files, without getting confused so that i don't pull every hair out of my head?
Please help me.
March 18, 2008 1:52 PM
April 26, 2011 7:22 PM