IBM Version 4 Universal Remote User Manual


 
Handling Error Conditions—ILE RPG Example
Refer to “Handling Error Conditions—OPM RPG Example” on page 3-8 for the ori-
ginal example. This example can be written only in OPM RPG and ILE RPG.
Dᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
Dᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
D
Dᑍ Program Name: JOBDAPI
D
Dᑍ Programming Language: ILE RPG
D
Dᑍ Description: This program retrieves the HOLD value from
Dᑍ a job description. It expects errors to be
Dᑍ sent as escape messages.
D
Dᑍ Header Files Included: QUSEC - Error Code Parameter
Dᑍ QWDRJOBD - Retrieve Job Description API
D
Dᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
Dᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
D
Dᑍ Error Code parameter include
D
D/COPY QSYSINC/QRPGLESRC,QUSEC
D
Dᑍ Retrieve Job Description API Include
D
D/COPY QSYSINC/QRPGLESRC,QWDRJOBD
D
Dᑍ Program status DS
D
DPGMSTS SDS 12
D MSG_ID 4 46
D
Dᑍ Command string data structure
D
DCMD_STRING DS
D 26 INZ('SNDMSG MSG(''HOLD value is ')
D HOLD 1
D 15 INZ(''') TOUSR(QPGMR)')
D
Dᑍ Miscellaneous data structure
D
DRCVLEN S 9B  INZ(%SIZE(QWDD1))
DFORMAT S 8 INZ('JOBD1')
DLENSTR S 15 5 INZ(%SIZE(CMD_STRING))
DNO_JOBD S 47 INZ('SNDMSG MSG(''No such ᑍJOBD -
D exists'') TOUSR(QPGMR)')
DNO_JOBD_SZ S 15 5 INZ(%SIZE(NO_JOBD))
C
Cᑍ Beginning of mainline
C
Cᑍ Two parameters are being passed into this program
C
C ᑍENTRY PLIST
C PARM JOBD 1
C PARM JOBD_LIB 1
C
B-8 System API Programming V4R1