IBM Version 4 Universal Remote User Manual


 
1 X PIC S9(9) BINARY.
ᑍ Job Description and Library Name Structure
1 JOBD-AND-LIB-NAME.
5 JOB-DESC PIC X(1).
5 JOB-DESC-LIB PIC X(1).
LINKAGE SECTION.
ᑍ 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 1.
MOVE 1 TO BYTES-PROVIDED.
ᑍ Receiver Length Set to 1.
MOVE 1 TO RECEIVER-LENGTH.
ᑍ Call the QWDRJOBD API.
CALL QWDRJOBD USING RECEIVER-VARIABLE, RECEIVER-LENGTH,
FORMAT-NAME, JOBD-AND-LIB-NAME, QUS-EC.
ᑍ See if any errors were returned in the error code parameter.
PERFORM ERRCOD.
ᑍ Add one to the Initial library list offset because COBOL is a
ᑍ Base 1 language.
MOVE OFFSET-INITIAL-LIB-LIST TO X.
ADD 1 TO X.
MOVE 47 TO COMMAND-LENGTH.
ᑍ Let's tell everyone what the library value was for this job.
PERFORM NUMBER-LIBS-IN-LIB-LIST TIMES
MOVE RECEIVER-VARIABLE(X:1) TO LIB,
CALL QCMDEXC USING COMMAND-STRING, COMMAND-LENGTH,
ADD 11 TO X,
PERFORM RECLEN,
END-PERFORM.
B-28 System API Programming V4R1