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

CALL statement in COBOL for VSE


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

New User


Joined: 26 Jun 2020
Posts: 1
Location: India

PostPosted: Fri Jun 26, 2020 12:12 pm
Reply with quote

Hi,
I am working in converting COBOL code from COBOL6 to COBOL for VSE. I am getting compilation error in VSE for CALL statement.

Error msg - "RETURNING" was not defined as a data-name. The statement was discarded.

Model code in COBOL 6:

CALL PROGRAM-A USING VARIABLE-1 VARIABLE-2
RETURNING VARIABLE-3

please help me on this. I am not much familiar in COBOL for VSE. Thanks in advance!!
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Jun 26, 2020 1:33 pm
Reply with quote

What is the format in the COBOL for VSE manual?
Back to top
View user's profile Send private message
lchui

New User


Joined: 10 Jun 2020
Posts: 7
Location: Canada

PostPosted: Thu Jul 23, 2020 2:29 am
Reply with quote

(Posting on behalf of colleagues Captain COBOL and Bernie R):

COBOL for VSE has very different syntax from COBOL V6. The syntax supported by COBOL for VSE is from COBOL for z/OS and VM, circa 1998, so newer syntax COBOL (like the RETURNING phrase which was added to z/OS COBOL in 2001) cannot be ported to COBOL for VSE easily! You will have to re-design.
Another option would be to pass VARIABLE-3 (the RETURNING value) as a parameter.

Hope this helps.
Back to top
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 121
Location: Puerto Rico

PostPosted: Fri Jul 24, 2020 1:34 am
Reply with quote

In VSE COBOL the return is not use, your call would be:
call program-a using variable-1 variable-2 variable-3
In COBOL 6 the 'return' was probably added as a separator and to make it more readable form because what's passed to the called program in the parameter list is three addresses.

Edited by Mod to make mixed case instead of all upper case
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top