IBM i - CL Array
Posted on 2016-08-25
Does anyone know if it is possible to create, sort, and read from arrays within CL on the IBM i? I am currently running V7R1.
Basically I am creating a program that will write out all *PGM objects within a given library and display the last change date for that object. (this is for our SOX auditors).
I have the program created easily enough and I wrote everything to a .CSV file in the IFS. However, our auditors are ultimately looking for the most recently changed object in a given library. So for them to get that from my spreadsheet, they would have to open it up, and highlight everything - and then do a SORT on the CHANGE DATE "column".
I was wondering if - before I wrote the data to the outfile - I could write all the data to an array and then after everything was written to the array, sort the array based on the Change Date, and then read back through the array so that I can then write the output to my .csv file in the IFS.
Anyone have any idea if that is possible using CL? I know you can do that sort of thing with COBOL and RPG - but was hoping to accomplish this with just CL.
Thanks in advance!