Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Call statement is not executing in main pgm?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Call statement is not executing in main pgm?
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: 356
Location: New York

PostPosted: Wed May 28, 2008 2:12 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: Call statement is not executing in main pgm?
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    Post subject:
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: 276
Location: Bang,iflex

PostPosted: Wed May 28, 2008 2:46 pm    Post subject:
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: 6967
Location: porcelain throne

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

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

Active User


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

PostPosted: Wed May 28, 2008 2:57 pm    Post subject:
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    Post subject: Reply to: Call statement is not executing in main pgm?
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: 6967
Location: porcelain throne

PostPosted: Wed May 28, 2008 7:24 pm    Post subject:
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: 276
Location: Bang,iflex

PostPosted: Thu May 29, 2008 8:47 am    Post subject:
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    Post subject: Reply to: Call statement is not executing in main pgm?
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts Need help in triggering a PL1 module ... Varungv99 IMS DB/DC 0 Fri Apr 07, 2017 10:01 am
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us