Loop

chemker

Well Known Member
Does anyone know how to "dump" an interactive job even if there is no program message to answer? We are having problems with the creating of credit orders from history looping but cannot duplicate the problem to debug. It would help if we could get a dump of the program, rather than just ending the job.

Thank you.
 
Method 1:

If the program is an OPM program, you can use STRISDB to simultaneously
service and debug the interactive job that is looping from another
workstation.

Example: STRISDB PGM(P4211) INVPGM(*NO) SRVJOB(*SELECT)

This will show you a list of jobs running on the system. Page down until
you find the job you want to service, then place a '1' in the option field
to select it for servicing/debugging. At this point, set a break point.
When the program reaches the break point, you will get the ISDB/400 display,
and can then step thru the code.

Method 2:
If the program is an ILE OR an OPM program,

1) STRSRVJOB JOB(jobnbr/Userid/Jobname)
2) STRDBG PGM(P4211) UPDPROD(*YES)
3) Set a break point
4) Step thru the code

HTH

Steve Landess
Austin, Texas
(512) 423-0935

----- Original Message -----
From: "chemker" <[email protected]>
To: <[email protected]>
Sent: Thursday, April 24, 2003 3:00 PM
Subject: Loop


program message to answer? We are having problems with the creating of
credit orders from history looping but cannot duplicate the problem to
debug. It would help if we could get a dump of the program, rather than
just ending the job.Thank you.



Steve Landess
V4R4 A7.3 cume9
EDI
(512) 423-0935
 
When you say loop, do you mean that it is returning more than one copy of the sales order line......?

If so, check the processing Options for Next Status of the version of F4211 (the Credit Order bit) that is being called by the Credit from History Program......

This processing option controls which Next Status it is selecting off the F42199 (Sales Ledger File), where there could be more than one occurrence of the order line at that status (sometimes happens if you run reprice a few times before invoicing, where the status isn't advanced but a record is written to the Sales Ledger).....

It says its Credit From History (you'd think F42119), but it actually selects the records from the F42199. Thus allowing you to select the record that will give the correct price..... (One usually does this for status 580 - what was invoiced to the customer --- but there is the flexibility of crediting the customer at any stage e.g. before Ship confirm, which could be at a different price to that at invoice......!)
 
Maybe (-maybe-) something like the following. This is off the top of my
head, with all appropriate disclaimers--in other words "Don't blame me!".

1. Get the job-ID: number, name, user, and the program name.

2. From a different interactive job:

a. Hold the job.

a. >> STRSRVJOB JOB(&jobnumber/&jobuser/&jobname) <<

b. >> STRDBG &pgm-name.....[..other appropriate parameters...] <<

--And as long as that job is compiled properly (being JDE it might not be)
you can walk through the code at that point. But if not, if you know
something about where it's looping, you might be able to guess at some value
to change to make it blow up.


----- Original Message -----
From: "chemker" <[email protected]>
To: <[email protected]>
Sent: Thursday, April 24, 2003 3:53 PM
Subject: Loop


program message to answer? We are having problems with the creating of
credit orders from history looping but cannot duplicate the problem to
debug. It would help if we could get a dump of the program, rather than
just ending the job.Thank you.
 
On that same Note. What about any World Writer Reports. Can I do the same i.e. Debug. if it loops..

Cheers
 
We found it! It appears that the users were going into page mode order entry for a different order first, then hitting F12, coming out, going into customer service and inquiring by invoice number, not document number - the document number was not getting set when going to the history file, so it was reading all of sales order history!
 
Back
Top