Hello, all
I've hit a wall with trying to create and run a cl pgm that uses IBM Spool Services:
https://www.ibm.com/support/knowledg...utqentries.htm
Sample pgm:
I keep running into errors when I call this pgm:
Message ID . . . . . . : SQL0199
Keyword BY not expected. Valid tokens: FOR USE SKIP WAIT WITH FETCH LIMIT
ORDER UNION EXCEPT OFFSET.
My goal is to receive output of spooled files in a 'held' status. After I get the database output I plan on using this for another cl pgm to help me release those held spooled files. Thanks.
I've hit a wall with trying to create and run a cl pgm that uses IBM Spool Services:
https://www.ibm.com/support/knowledg...utqentries.htm
Sample pgm:
Code:
0001.00 PGM 0002.00 RUNSQL SQL('CREATE TABLE MYTESTLIB/SPLFILES AS + 0003.00 (SELECT SPOOLED_FILE_NAME,JOB_NAME,FILE_NUMBER,CREATE_TIME STAMP,+ 0004.00 USER_NAME,DEVICE_FILE_NAME,FORM_TYPE,USER_DATA + 0005.00 FROM TABLE(QSYS2/OUTPUT_QUEUE_ENTRIES("MYTESTLIB","MYTESTQ","*NO")) + 0006.00 ORDER BY SPOOLNAME + 0007.00 WHERE STATUS = "HELD" + 0008.00 WITH DATA') + 0009.00 COMMIT(*NONE) 0010.00 0011.00 0012.00 ENDPGM
Message ID . . . . . . : SQL0199
Keyword BY not expected. Valid tokens: FOR USE SKIP WAIT WITH FETCH LIMIT
ORDER UNION EXCEPT OFFSET.
My goal is to receive output of spooled files in a 'held' status. After I get the database output I plan on using this for another cl pgm to help me release those held spooled files. Thanks.
Comment