IBM Version 4 Universal Remote User Manual


 
ᑍ Two Parameters are being passed into this program.
1 JOBD PIC X(1).
1 JOBDL PIC X(1).
PROCEDURE DIVISION USING JOBD, JOBDL.
MAIN-LINE.
ᑍ Beginning of Mainline
ᑍ Move the two parameters passed into JOB-DESC and JOB-DESC-LIB.
MOVE JOBD TO JOB-DESC.
MOVE JOBDL TO JOB-DESC-LIB.
ᑍ Error Code Parameter is set to 16.
MOVE 16 TO BYTES-PROVIDED.
ᑍ Receiver Length Set to 39.
MOVE 39 TO RECEIVER-LENGTH.
ᑍ Call the QWDRJOBD API.
CALL QWDRJOBD USING QWD-JOBD1, RECEIVER-LENGTH,
FORMAT-NAME, JOBD-AND-LIB-NAME, QUS-EC.
ᑍ If no bytes available, API was successful; print HOLD value
IF BYTES-AVAILABLE OF QUS-EC =  PERFORM GOOD.
ᑍ If some bytes available, API failed; print Error message ID
IF BYTES-AVAILABLE OF QUS-EC >  PERFORM BAD.
STOP RUN.
ᑍ End of Mainline
ᑍ Subroutine to perform if no errors were encountered.
GOOD.
OPEN OUTPUT LISTING.
MOVE HOLD-JOB-QUEUE TO HOLD.
WRITE LIST-LINE FROM HOLD-VALUE.
ᑍ Subroutine to perform if an error was returned in error code.
BAD.
OPEN OUTPUT LISTING.
MOVE EXCEPTION-ID TO MSGID.
B-20 System API Programming V4R1