Bookmark and Share
RSS

Recent Posts

IBM i 7.3 Enhancement for End Job Abnormal (ENDJOBABN)

September 20, 2016

I’d like to thank Mike Russell, software engineer at IBM, for writing this blog article.
 
In the 7.3 release, IBM added a new parameter to the End Job Abnormal (ENDJOBABN) command.

End Job Abnormal (ENDJOBABN)

Type choices, press Enter.

Job name . . . . . . . . . . . . __________ Name
User . . . . . . . . . . . . . __________ Name
Number . . . . . . . . . . . . ______ 000000-999999

Additional Parameters

Duplicate job option . . . . . . *SELECT *SELECT, *MSG
Data to be dumped . . . . . . . *JOB_ *JOB, *NONE


We added the dump parameter to help answer the question "Why won't my job end?".

When a job is ended before it has completed there is application and operating system clean up that is performed. Shared files and objects need to be updated and made available to be used again. Storage needs be released. When a job is ended with the ENDJOB command, invocation exits and cancel handlers are run for active programs and then the job enters a termination phase where open files are closed and activation groups are destroyed. These clean up programs usually complete and the job ends. But when these clean up programs loop forever or hang, the ENDJOBABN command can be used to force the job to end without finishing the clean up. There is a minimum ten minute limit for end job immediate to complete before end job abnormal can be used. Additional clean up is performed on the next IPL when ENDJOBABN has been used.

The program call stack from the Display Job output can be used to see what the job is doing when it should have ended.

In this case an application program has used the set invocation exit (SETIEXIT) instruction to get control to perform clean up when the program is abnormally ended. The invocation exit program (CLEAN_UP) is waiting for a response to an inquiry message.

Job Call Stack
Thread . : 00001E3B
Module or Ctl
Type Program Statement Identifiers Instruction Activation Group Expanded Type Bdy
1 QCMD QSYS 01C8 *DFTACTGRP 0000000000000001 Y
APPPGM APPLIB 0050 *DFTACTGRP 0000000000000001 N
CLEAN_UP APPLIB 400 0010 *DFTACTGRP 0000000000000002 N
QMHRCVMS QSYS 0084 *DFTACTGRP 0000000000000001 N
QMHRCVM QSYS 0DCC *DFTACTGRP 0000000000000001

In this case an application has used the CEE4RAGE API to register an activation group exit that is called during termination phase. The exit program has a logic error causing it to loop forever.

Job Call Stack
Thread . : 00001235
Module or Ctl
Type Program Statement Identifiers Instruction Activation Group Expanded Type Bdy
QWTPITPP QSYS 0002 *DFTACTGRP 0000000000000001 Y
QWTPITP2 QSYS 0680 *DFTACTGRP 0000000000000001 N
QLEDAGE QSYS *DFTACTGRP 0000000000000001 QLEDAGE QBUILDSS1 Y
Procedure: _CXX_PEP__Fv
QLEDAGE QSYS 358 *DFTACTGRP 0000000000000001 QLEDAGE QBUILDSS1 N
Procedure: main
QLEAGTRM QSYS 14 *DFTACTGRP 0000000000000001 QLEAGTRM QBUILDSS1 N
Procedure: Q LE cleanup_ag
QLEAGTRM QSYS 3 *DFTACTGRP 0000000000000001 QLEAGTRM QBUILDSS1 N
Procedure: callUserExit__FRV10COM_AREA_T
QLECWI QSYS 42 APP 0000000000000013 QLEEXIT QBUILDSS1 Y
Procedure: startActGrpExits__Fv
QLECWI QSYS 21 APP 0000000000000013 QLEEXIT QBUILDSS1 N
Procedure: regNextPriority_ch__FP18_CNL_Hndlr_Parms_T
QLECWI QSYS 28 APP 0000000000000013 QLEEXIT QBUILDSS1 N
Procedure: regNextExit__F10CALL_COM_TP12exit_entry_tPv
QLECWI QSYS 19 APP 0000000000000013 QLEEXIT QBUILDSS1 N
Procedure: callExit_ch__FP18_CNL_Hndlr_Parms_T
QLEAWI QSYS 38 APP 0000000000000013 QLERAGE QBUILDSS1 N
Procedure: RAGER__FULUiPVUi
MYAGEXIT QGPL 3 APP 0000000000000013 AGEXIT RUSSELL N
Procedure: AGExit

This enhancement should provide you with information to pursue problems for jobs that won't end with application providers and IBM.

Posted September 20, 2016 | Permalink

Post a Comment

Note: Comments are moderated and will not appear until approved

comments powered by Disqus