I think you can do this with RTVSPLFA
It allows you to specify Spooled file number . . . . . . *LAST
Return spooled file number (6)
Sounds like you may want to do this after the fact and posibly not have a job name.
First, use the WRKSPLF command and specify output(*PRINT)
Note: you can get a subset of you use some of the options on the command or you can get everything.
Now, the output from that wil be a splf that you can copy to a database.
If you use the proper selection, you can just get the detail records.
Now, with SQL or QRY, you can sort the file by FIle Number, or do any other kind of interegation you would like to do,
What a compliment Whatis23 but it was CharlieBrowns idea that you’re expanding on .. mine, RTVSPLFA, may have died a glorious death?