Adding Return Codes to JESMSGLG
In order to add STEPs return codes to JESMSGLG you may follow the following steps, be aware it always depends on the OS version.
Activate SMF to collect Data
Test if SMS collects and active using the console command:
/D SMF
If not activated then look for the correct SMF PARMLIB member. You may use the following console command for that:
/D SMF,O
Copy the member to the user PARMLIB and rename it to have a different SMFPRMXX suffix (ex. SMFPRM00 to SMFPRM01), edit it and change the directive NOACTIVE to ACTIVE save it.
The IEFACTRT exit (explained in the next step) invokes when SMF records 4,5,40,32,34, or 35 are being collected. It needs to be defined in the SMFPRMxx member either and mentioned in the EXITS list.
Activate SMF using the console command below.
/SET SMF=01
Update the IEASYSxx PARMLIB member with the new SMFPRM suffix. Use SMF=XX for that, where XX is the new SMFPRM member suffix
Applying the SMF’s exit IEFACTRT
SMF’s Exit IEFACTRT - The JOB and STEP termination exit is responsible among the rest of the JESMSGLG messages. Locate the current provided module, it may be in the LPA (SYS1.LPALIB) and copy it to another location as a backup.
Locate the source code of the IEFACTRT module, it is in the SAMPLIB library (SYS1.SAMPLIB), it is called IEEACTRT (Yes with ‘E’ as the third letter).
Compile it using your Assembler Compile and linkage procedure (ASMACL in the example below), it may looks like:
//CL EXEC ASMACL,
// PARM.L='MAP,LIST,LET,RENT,REUS,NCAL,RMODE(ANY),AMODE(31)'
//COMP.SYSLIB DD DISP=SHR,DSN=SYS1.MODGEN
// DD DISP=SHR,DSN=SYS1.MACLIB
//COMP.SYSIN DD DISP=SHR,DSN=SYS1.SAMPLIB(IEEACTRT) Source
//LKED.SYSLMOD DD DISP=SHR,DSN=SYS1.LPALIB(IEFACTRT) LM Target
Check the retun code for normal completion code, if not - stop here and look to fix the error.
Add the exit to PROGxx member in PARMLIB
exit add exitname(SYS.IEFACTRT) modname(IEFACTRT)
You can dynamically load the module to LPA
/setprog lpa,add,modname=IEFACTRT,dsname=SYS1.LPALIB
You can dynamically activate it
/setprog exit,add,exitname=SYS.IEFACTRT,modname=IEFACTRT
If it is already defined use:
/setprog exit,replace,exitname=SYS.IEFACTRT,modname=IEFACTRT
Submit a job and check it works