If I have a job running in a job queue and I know it is looping and I do 11 from WRKACTJOB to 'Display Call stack, if active', I can see my program that has a 'Statement' that fluctuates.
What I cannot figure out is how to trap this error. It has under 'Procedure' /1447 when it does an .OPEN under 'Statetment' and a /1409 when it does a .CLOSE. I cannot trap this error.
I though that maybe it meant it was line number 1447 when I compiled it and searched for 1447 in my spool file for the program. This is a MOVE statement so that '/ followed by a number' is not the line number.
I need to know what line it keeps going back and forth to. I obviously have a loop. What does the '/1447' mean under 'Procedure' for the 'Display call stack'. I cannot trap the issue. It is very intermittent and I can't figure it out.
Software/Hardware used:
ASKED:
October 20, 2010 9:12 PM
UPDATED:
October 23, 2010 12:03 AM
I cannot debug this program. It is a job ‘listening’ in a live environment and kicks off. I have to rely on when it’s looping and I use the information in the WRKACTJOB to try and determine what is happening. The open files and what relative record it’s stuck on, etc.
Using this approach, under ‘Display Call Stack’ what does th ‘Procedure’ ‘/1407′ (i know that is specific to my program) mean? I have to be able to see what that is pointing to somehow.
If it is your program that is looping, you should be able to get into it while it is looping.
Unless you did not compile it so that have that option.
If that is the case, recompile it.
Or are you telling us the the looping program in not yours?
The looping program is mine but I don’t see how I can get ‘into it’ while it is running. I just would like to know what lines the /1409 and /1447 is referencing. I only have the info (from my experience) from WRKACTJOB. I am not a huge systems person, more of a COBOL developer.
You get ‘into it’ pretty much the way CharlieBrowne described, with STRSRVJOB and STRDBG. However, it might take extra steps depending on how the job is started. You’ll also need to have (or to obtain) *SERVICE special authority in order to ‘service’ a job.
As for what “lines” it is referencing, the help text for the ‘Display Call stack, if active’ already tells you what you’re looking at. From the help text:
If it’s your program and you can recompile it (and it’s a COBOL/400 program), compile it into perhaps QTEMP with GENOPT(*LIST) to get an idea of what “/1407″ might refer to. Be prepared for a potentially very long listing.
Tom