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
 

 

wht happens if i wont give identifire with USING in CALL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
yaju4ever
Warnings : 1

New User


Joined: 30 Sep 2006
Posts: 19
Location: mumbai

PostPosted: Fri Dec 08, 2006 11:10 pm    Post subject: wht happens if i wont give identifire with USING in CALL
Reply with quote

if i am calling a subroutine through CALL statement like this way
CALL pgm-id_subrtn......
in above syntax i have not used the data items to pass then wht will happen....
how my main program would get connected with the subroutine....coz in subroutine main program gets connect with subroutine through data item specified in USING option of the CALL statement....
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Dec 08, 2006 11:22 pm    Post subject:
Reply with quote

The call does the connecting, not the data.

Hopefully, the subroutine would be smart enough to verify the existance and quantity of the passed parameters.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2239
Location: @my desk

PostPosted: Mon Dec 11, 2006 2:00 pm    Post subject:
Reply with quote

Hi William

Does it mean that it is not mandatory to have the USING phrase with CALL....?

Thanks
Arun
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Mon Dec 11, 2006 2:09 pm    Post subject: Re: wht happens if i wont give identifire with USING in CALL
Reply with quote

Quote:
Does it mean that it is not mandatory to have the USING phrase with CALL....?

No, it is not... See the manual quoted on the same...
Quote:
Include the USING phrase in the CALL statement only if there is a USING phrase in the Procedure Division header or the ENTRY statement through which the called program is run. The number of operands in each USING phrase must be identical.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Dec 11, 2006 3:14 pm    Post subject:
Reply with quote

arcvns wrote:
Does it mean that it is not mandatory to have the USING phrase with CALL....?
True, they are not manditory, but they are handy for passing data.

By the way, if the suproutine is smart, The number of operands in each USING phrase do not hace to be identical.
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 scheduling between OPC and TWS give u... nsbl IBM Tools 3 Sun Mar 12, 2017 5:35 pm
No new posts Cobol EZASOKET call to SETSOCKOPT fails Andi1982 COBOL Programming 6 Thu Oct 06, 2016 7:12 pm
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am
No new posts Is possible to call subprogram from c... cmsmoon COBOL Programming 3 Fri Aug 05, 2016 6:46 pm


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