IBM Version 4 Universal Remote User Manual


 
ᑍ DISPLAY THE INFORMATION RETURNED
C MOVELQUSDD RECVR 52
C DSPLY RECVR
C ADD 52 START 1
C ADD 1 X
C END
ᑍ DELETE THE SPACE THAT HELD THE DATA
C CALL 'QUSDLTUS'
C PARM SPCNAM
C PARM QUSBN
C SETON LR
Defining List Entry Format Lengths—Example of Correct Coding
The following program correctly uses the list entry length that is defined in the
space header for the QUSRTVUS API to advance from one entry to the next. This
is shown at 11 on page 9-17. If you use this value in your program, you will
always have the correct list entry length regardless of the version or release level of
the API.
ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
ᑍProgram Name: PGM2
ᑍProgram Language: RPG
ᑍDescription: This sample program illustrates the correct
way of using list entry length formats.
ᑍHeader Files Included: QUSEC - Error Code Parameter
QUSLJOB - List Job API
QUSGEN - User Space Format for Generic Header
ᑍAPIs Used: QUSCRTUS - Create User Space
QUSLJOB - List Job
QUSRTVUS - Retrieve User Space
QUSDLTUS - Delete User Space
ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
ᑍ THIS PROGRAM WILL CREATE THE NECESSARY SPACE AND THEN CALL
ᑍ THE QUSLJOB API TO GET A LIST OF ALL ACTIVE JOBS ON THE SYSTEM.
I/COPY QSYSINC/QRPGSRC,QUSGEN
I/COPY QSYSINC/QRPGSRC,QUSLJOB
I/COPY QSYSINC/QRPGSRC,QUSEC
ᑍᑍ JOB NAME STRUCTURE FOR CALLING QUSLJOB
IJOBNAM DS
I I 'ᑍALL ' 1 1 JOB
I I 'ᑍALL ' 11 2 USER
I I 'ᑍALL' 21 26 JOBNUM
ᑍᑍ DATA STRUCTURE TO HOLD SPACE NAME
ISPCNAM DS
I I 'SPCNAME ' 1 1 SPC
I I 'QTEMP ' 11 2 LIB
ᑍᑍ OTHER ASSORTED VARIABLES
I DS
I I 2 B 1 4SIZ
I B 5 8START
I B 9 12LENDTA
I I X'' 13 13 INTVAL
9-16 System API Programming V4R1