Troubleshooting
Problem
The following is a CL program example that calls the QUSRJOBI API to retrieve the job number.
Resolving The Problem
|
Disclaimer: This is only an example. IBM accepts no responsibility for its correctness. |
This is an example of a CL program that calls the QUSRJOBI API to retrieve the job number.
Example: Source is named USRJOBI
PGM
DCL VAR(&RCVVAR) TYPE(*CHAR) LEN(129)
DCL VAR(&RCVLEN) TYPE(*CHAR) LEN(4)
DCL VAR(&FMTNAM) TYPE(*CHAR) LEN(8) VALUE('JOBI0600')
DCL VAR(&JOBNAM) TYPE(*CHAR) LEN(26) VALUE('*')
DCL VAR(&INTJOB) TYPE(*CHAR) LEN(16)
DCL VAR(&JOBNUM) TYPE(*CHAR) LEN(8)
CHGVAR VAR(%SST(&RCVVAR 129 1)) VALUE('X')
CHGVAR VAR(%BIN(&RCVLEN)) VALUE(128)
CALL PGM(QSYS/QUSRJOBI) +
PARM(&RCVVAR &RCVLEN &FMTNAM &JOBNAM &INTJOB)
CHGVAR VAR(&JOBNUM) VALUE(%SST(&RCVVAR 29 6))
SNDPGMMSG MSG(&JOBNUM)
ENDPGM
> CRTBNDCL PGM(<yourlib>/USRJOBI) SRCFILE(<yourlib>/QCLLESRC) SRCMBR(USRJOBI)
Program USRJOBI created in library <yourlib>.
> CALL USRJOBI
414806
Program USRJOBI created in library <yourlib>.
> CALL USRJOBI
414806
[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m3p0000006x8GAAQ","label":"CL"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]
Historical Number
472935454
Was this topic helpful?
Document Information
Modified date:
13 November 2024
UID
nas8N1013942