ᑍ DELETE THE SPACE THAT HELD THE DATA
C CALL 'QUSDLTUS'
C PARM SPCNAM
C PARM QUSBN
ᑍ
C SETON LR
Defining Receiver Variables—Example of Correct Coding
The following example program defines a larger receiver variable: 60 bytes. This
is shown at position 9 on page 9-13. This increase in the receiver variable allows
up to 60 bytes of data to be received.
ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
ᑍ
ᑍProgram Name: PGM2
ᑍ
ᑍProgram Language: RPG
ᑍ
ᑍDescription: This sample program illustrates the correct
ᑍ way of defining receiver variables.
ᑍ
ᑍ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
ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
ᑍ
ᑍ BRING IN THE ERROR STRUCTURE FROM QSYSINC
I/COPY QSYSINC/QRPGSRC,QUSEC
ᑍ BRING IN THE GENERIC USER SPACE HEADER FROM QSYSINC
I/COPY QSYSINC/QRPGSRC,QUSGEN
ᑍ
ᑍᑍ JOBL1 FORMAT RETURNED FROM QUSLJOB API
I/COPY QSYSINC/QRPGSRC,QUSLJOB
ᑍ
ᑍᑍ 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
ISPCNAM DS
I I 'SPCNAME ' 1 1 SPC
I I 'QTEMP ' 11 2 LIB
ᑍᑍ OTHER ASSORTED VARIABLES
I DS
I I 2 B 1 4SIZ
I B 5 8START
I B 9 12LENDTA
I I X'' 13 13 INTVAL
ᑍ
ᑍ SET UP TO ACCEPT EXCEPTIONS
C Z-ADDᑍZEROS QUSBNB
ᑍ
9-12 System API Programming V4R1