I have a program that I want to release the spool files that are on hold as the very last step. There may be mutiple spool files with the same name and I want to release them all. I have some code in the program that goes liike this:
The program blows up because there are more than one spool file with the same name. To me, ANY means ANY but apparently not. I want to reelase them in the order they were created, if possible so *LAST is not a a choice. Also, they may not be ordered consecutively, that is, there may be a APDDCHK nmbr(0001), APDDCHK nmbr(0002), APDDCHK nmbr(0003) and APDDCHK nmbr(0005) but no APDDCHK nmbr(0004).
How can I make the program release them in order created.
Code:
RETRY: RLSSPLF FILE(APDDCHK) SPLNBR(*ANY) MONMSG MSGID(CPF3300) EXEC(GOTO CMDLBL(ENDTAG)) GOTO CMDLBL(RETRY) ENDTAG: ENDPGM
How can I make the program release them in order created.
Comment