AS/400 Display Call Stack Procedure Help

185 pts.
Tags:
AS/400 Display Call Stack Procedure Help
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.

Answer Wiki

Thanks. We'll let you know when a new response is added.

First, jobs do not RUN in job queues.
Job queues are jobs waiting to execute.
They execute in subsystems.
==
Now to your question:
The easiset was is to debug the job
To debug a batch job
STRSTVJOB &Job informatiom
STRDBG &Program that is running
now add your breakpoint and then use F10 or (F20 on any call command) to step through the program and see what is going on.

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • 400Programmer
    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.
    185 pointsBadges:
    report
  • CharlieBrowne
    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?
    41,380 pointsBadges:
    report
  • 400Programmer
    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.
    185 pointsBadges:
    report
  • TomLiotta
    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:
    • A machine instruction number appears as a hexadecimal value preceded by a / (slash). Machine instructions numbers are only displayed for original program model (OPM) programs.
    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
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following