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

Call statement is not executing in main pgm?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
babu_hi

New User


Joined: 11 Apr 2006
Posts: 93

PostPosted: Wed May 28, 2008 1:59 pm
Reply with quote

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

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Wed May 28, 2008 2:12 pm
Reply with quote

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

New User


Joined: 11 Apr 2006
Posts: 93

PostPosted: Wed May 28, 2008 2:19 pm
Reply with quote

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

New User


Joined: 19 May 2008
Posts: 13
Location: Pune

PostPosted: Wed May 28, 2008 2:21 pm
Reply with quote

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

New User


Joined: 19 May 2008
Posts: 13
Location: Pune

PostPosted: Wed May 28, 2008 2:27 pm
Reply with quote

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

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Wed May 28, 2008 2:46 pm
Reply with quote

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

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed May 28, 2008 2:51 pm
Reply with quote

RTFM................................................
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Wed May 28, 2008 2:57 pm
Reply with quote

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

New User


Joined: 19 May 2008
Posts: 13
Location: Pune

PostPosted: Wed May 28, 2008 6:36 pm
Reply with quote

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

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed May 28, 2008 7:24 pm
Reply with quote

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

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Thu May 29, 2008 8:47 am
Reply with quote

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

New User


Joined: 16 Jul 2006
Posts: 21
Location: delhi

PostPosted: Thu May 29, 2008 10:05 am
Reply with quote

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

New User


Joined: 11 Apr 2006
Posts: 93

PostPosted: Thu May 29, 2008 10:54 am
Reply with quote

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
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Call program, directly from panel CLIST & REXX 9
No new posts executing XCTL command in COBOL witho... CICS 10
No new posts Batch call online program, EXCI task ... CICS 3
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
Search our Forums:

Back to Top