View previous topic :: View next topic
|
Author |
Message |
satish.ms10
Active User
Joined: 10 Aug 2009 Posts: 184 Location: India
|
|
|
|
Hi,
Thanks a lot for your support.
Is there any command/way to trace/debug the easytrieve program line by line execution?
Kindly assist.
Thanks,
Sati |
|
Back to top |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
As far as I know there is no line-by-line interactive trace for Easytrieve like Expeditor for COBOL. Of course you can put in Display's.
Easytrieve does have a Debug option that can help when you get an abend...
//SYSIN DD *
PARM DEBUG (XREF LONG STATE DMAP FLOW FLOWSIZ (25)) +
PRESIZE 1024 |
|
Back to top |
|
|
satish.ms10
Active User
Joined: 10 Aug 2009 Posts: 184 Location: India
|
|
|
|
Hi Gary,
Thank you very much for your quick reply.
I am not looking for interactive trace. I just need how the flow goes when the program executes.
Which debug options we should use in this situation?
Kindly help.
Thanks,
Sati |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
As Gary says, the FLOW only comes into action on a program failure.
You could investigate in the manual the maximum for FLOWSIZ, and then conditionally on your test data, cause an abend at a particular point. You should see the previous FLOWSIZ statement numbers. |
|
Back to top |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
I like that idea Bill. I "forced" an abend on 10th record and saw the statement numbers (flow) before the abend...
Code: |
//SYSIN DD *
FILE FILEA
*--- INPUT ---
I-REC 1 80 A
I-FIELD-ABEND 1 5 P 0 HEADING ('ABEND' 'FIELD')
I-FIELD 1 5 A HEADING ('OK')
*
W-COUNT S 5 N 0. *RECORD COUNT
*
JOB INPUT FILEA NAME OUTPUT
*
W-COUNT = W-COUNT + 1
IF (W-COUNT = 10)
DISPLAY 'I-FIELD-ABEND...' I-FIELD-ABEND
ELSE
DISPLAY 'I-FIELD.........' I-FIELD
END-IF |
Code: |
STATEMENT NO. 12 14 15 16 18 20 21
END OF PROGRAM
I-FIELD.........THIS
I-FIELD.........IS
I-FIELD.........GOOD
I-FIELD.........DATA
I-FIELD.........THIS
I-FIELD.........IS
I-FIELD.........GOOD
I-FIELD.........DATA
I-FIELD.........TOO
16 *******A006 PROGRAM INTERRUPT - CODE 7 (DATA EXCP) |
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You could use RECORD-COUNT instead of keeping your own.
We used some macros, like
Code: |
%macro-name field-name value-to-abend-at |
Generated the IF and S0C7's with some DEFINEd S fields. Also for the DISPLAY of a text to indicate a PROC, or to show a field value, conditionally or otherwise. Always displayed the RECORD-COUNT.
Simple to put the macros in, simple to take them out. Put the effort into designing and coding them, then saves lots of time later and standardises, can even be used by people with no clue about how they work :-)
We had different versions for the Production compiles, with no content, so even if left in accidently there was no problem - to put it another way, you could leave them in and in Production they'd have no effect on anything (personally, I always took them out, as I'd use them for specific cases, unlikely to be needed again). |
|
Back to top |
|
|
satish.ms10
Active User
Joined: 10 Aug 2009 Posts: 184 Location: India
|
|
|
|
Hi All,
Thank you very much.
Will follow the given approaches and get back to you.
Thanks again.
Sati |
|
Back to top |
|
|
|