IBM Mainframe Forum Index
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in

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

New User

Joined: 26 Jun 2020
Posts: 1
Location: India

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

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:


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: 2429
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

New User

Joined: 10 Jun 2020
Posts: 3
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 All times are GMT + 6 Hours
Forum Index -> COBOL Programming
Page 1 of 1


Search our Forum:

Similar Topics
Topic Forum Replies
No new posts JCL for replacing code in Cobol JCL & VSAM 8
No new posts COBOL VS SORT Utility for file format... COBOL Programming 6
This topic is locked: you cannot edit posts or make replies. Splice JCL into one record for DD sta... SYNCSORT 2
No new posts XML Parsing in COBOL creating "h... COBOL Programming 0
No new posts Calling Rexx program from Cobol CLIST & REXX 12

Back to Top