I have downloaded an RPG example program where the program creates a user space with the API (QUSCRTUS) and then calls the API (QUSLSPL) to list spool files. This program runs fine I run it for *CURRENT as the user parm. I want to run it for *ALL users to get a list of all spool files on our system for all users. When I run it with *ALL in the parm, the program just runs for ever on the call to the"List Spool Files" API.
I was wondering if anyone else had this problem running this API this way. Here is an example of my code. Any help is greatly appreciated.
0148.00 C* Call QUSLSPL to get all spooled files for *CURRENT user
C CALL 'QUSLSPL'
C PARM SPC_NAME
C PARM 'SPLF0200' FORMAT 8
C*** PARM '*CURRENT' USR_PRF 10
C PARM '*ALL' USR_PRF 10
C PARM '*ALL' OUTQ 20
C PARM '*ALL' FORMTYP 10
C PARM '*ALL' USRDTA 10
C PARM QUSEC
C PARM JOBNAM 26
C PARM KEYS
C PARM KEY#
Software/Hardware used:
ASKED:
September 9, 2008 3:07 PM
UPDATED:
September 10, 2008 4:27 PM
We use that API with *ALL as part of a nightly routine to delete old spool files. Works well. Since it runs off hours I can not comment on the length of time it runs. The API does retrieve quite a bit of info so Bruce Vining’s comment makes a lot of sense.