View previous topic :: View next topic
|
Author |
Message |
babu_hi
New User
Joined: 11 Apr 2006 Posts: 93
|
|
|
|
I am calling sub program thru call statement in main pgm,but when i am debugging thru the expeditor it will not execute,after call statemnt the cursor should go to the sub pgm procedure division area but here cursor simply moved to the next statement.i have checked Linkage variable for successful call,it ir returning success return value only but call stetement is not working?Please look my code also?
Main program code:
***************************
* ARWFTB-LINKAGE-AREA
***************************
++INCLUDE ARWFTBIN
MOVE 'ARWFTB' TO CALL-PGM.
MOVE '009' TO LK-START-DATE OF ARWFTB-LINK-AREA.
CALL CALL-PGM USING ARWFTB-LINK-AREA.
IF GOOD-RETURN OF ARWFTB-LINK-AREA
PERFORM 85 TIMES
MOVE LK-IND-CNTL-TBNAME (LK-SUB)
TO WS-IND-CNTL-TBNAME (WS-SUB)
MOVE WS-IND-CNTL-TBNAME (WS-SUB) TO OUTPUT-REC
MOVE RETURN-TB-NAME TO OUTPUT-REC
WRITE OUTPUT-REC
END-PERFORM
CLOSE OUTPUT-FILE
END-IF.
Likage section of 01 level:
01 ARWFTB-LINK-AREA.
Sub Program:
***************************
* ARWFTB-LINKAGE-AREA
***************************
++INCLUDE ARWFTBIN
PROCEDURE DIVISION USING ARWFTB-LINK-AREA.
Please let me know why the above call is not executing? |
|
Back to top |
|
|
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
Hi,
I have not worked on Expeditor but worked on some other debugging tool. We used to give break point on the 1st statement of Sub-program to debug the sub-program.
Just try by providing break point at the procedure division statement of the sub-program.
KSK |
|
Back to top |
|
|
babu_hi
New User
Joined: 11 Apr 2006 Posts: 93
|
|
|
|
we will get the sub program procedure division if the call statement execute then only the cursor moved from main pgm to sub pgm procedure,but here call statement not executed,so not possible to set break poins in sub pgm procedure division of first state,ment. |
|
Back to top |
|
|
jckraheja
New User
Joined: 19 May 2008 Posts: 13 Location: Pune
|
|
|
|
Hi babu_hi,
Would like to ask question first......do u getting GOOD-RETURN value as '00' or successful...If YES then that means sub-program is executed successfully....
And the reason why expeditor not gone to the sub program is that u hv to first defined the program and sub program that need to debug, unless u mentioned ...cursor will not go to the sub program and return only value from sub program......
Hope...this would helps u!! |
|
Back to top |
|
|
jckraheja
New User
Joined: 19 May 2008 Posts: 13 Location: Pune
|
|
|
|
Hi...
One more thing....u have to defined break point in the sub program...and it is possible to set the breakpoint in the sub-program before the debugging of the program starts.....regardless of exicution of CALL statement... |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Hello,
Simply using break points in mainprogram and waiting for the SUBPROGRAM to debugg will not work for you.
You have to use the command
when CALL statement arrives at main program issue command as below
Code: |
COMMAND====>> INTERCEPT SUBPROGRAM |
Then expeditor pop up's the SUBPROGRAM for you and do debugging normally by issuing the break point. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
RTFM................................................ |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Hi,
Quote: |
Would like to ask question first......do u getting GOOD-RETURN value as '00' or successful...If YES then that means sub-program is executed successfully.... |
In expeditor we suppose to check, whether the logic is working properly or not and to trap the abends or unknown errors where exactly it come from, not really to check witth RETURN-CODE
I would like to ask you one question, did you work with expeditor before??? |
|
Back to top |
|
|
jckraheja
New User
Joined: 19 May 2008 Posts: 13 Location: Pune
|
|
|
|
Hi vasanthkumarhb,
I know very well why we use expeditor and how to use it. I asked him to check the RETURN-CODE as BABU might not able to c the exicution of the Sub program through Main Prog.....and one way use to check the successful exicution of program is to check GOOD-RETURN(that i refered as return code) which we set in sub pg....and if its value after exicution is come as ZERO then it means it doesn't have problem......
To c the exicution of sub-program its true we first intercept the sub program and set the breakpoint in sub program....so that when we come to exicute the CALL program , the cursor will goes to sub-program and exicute it first and come back to main program for the rest of the processing....
Hope it would be clear,.... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you can also use scripts, which will SOURCE all the modules required and set breakpoints. but that is, admittedly, for an advanced xpeditor user. |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Hi,
Quote: |
I asked him to check the RETURN-CODE as BABU might not able to c the exicution of the Sub program through Main Prog.....and one way use to check the successful exicution of program is to check GOOD-RETURN(that i refered as return code) |
I agree with the above scenario, If your subprogram is having 2000 lines and involves complex logic, then simply checking return-code not gives quality in the code, there is so many scenarios that can torture the program and finding the so called buggs.
I just need to say is you shouldnot debugg blindly. |
|
Back to top |
|
|
amalraj_ece
New User
Joined: 16 Jul 2006 Posts: 21 Location: delhi
|
|
|
|
hi babu,
did you include your sub module while generating the xpeditor's DDIO file?, if no this might be the reason. |
|
Back to top |
|
|
babu_hi
New User
Joined: 11 Apr 2006 Posts: 93
|
|
|
|
Thanks for all your inputs...........now i am able to see the sub program excution thru the INTERCEPT SUBPGM command.........now my problem solved. |
|
Back to top |
|
|
|