IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to trace line by line execution of a Easytrieve program


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
satish.ms10

Active User


Joined: 10 Aug 2009
Posts: 184
Location: India

PostPosted: Tue Apr 09, 2013 4:24 pm
Reply with quote

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
View user's profile Send private message
Gary McDowell

Active User


Joined: 15 Oct 2012
Posts: 139
Location: USA

PostPosted: Tue Apr 09, 2013 4:32 pm
Reply with quote

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
View user's profile Send private message
satish.ms10

Active User


Joined: 10 Aug 2009
Posts: 184
Location: India

PostPosted: Tue Apr 09, 2013 4:42 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Apr 09, 2013 4:53 pm
Reply with quote

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
View user's profile Send private message
Gary McDowell

Active User


Joined: 15 Oct 2012
Posts: 139
Location: USA

PostPosted: Wed Apr 10, 2013 12:42 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Apr 10, 2013 4:36 am
Reply with quote

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
View user's profile Send private message
satish.ms10

Active User


Joined: 10 Aug 2009
Posts: 184
Location: India

PostPosted: Wed Apr 10, 2013 3:38 pm
Reply with quote

Hi All,

Thank you very much.

Will follow the given approaches and get back to you.

Thanks again.
Sati
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Capturing Job Execution Information All Other Mainframe Topics 3
No new posts DB2 Event passed to the Application P... DB2 1
Search our Forums:

Back to Top