Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
CALL statement in COBOL for VSE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: CALL statement in COBOL for VSE
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: 2406
Location: Hampshire, UK

PostPosted: Fri Jun 26, 2020 1:33 pm    Post subject: Reply to: CALL statement in COBOL for VSE
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: 3
Location: Canada

PostPosted: Thu Jul 23, 2020 2:29 am    Post subject: Reply to: CALL statement in COBOL for VSE
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    Post subject: Reply to: CALL statement in COBOL for VSE
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    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 COBOL reading from SYSIN jzhardy COBOL Programming 1 Mon Sep 21, 2020 2:37 pm
No new posts how to read accounting information in... jzhardy COBOL Programming 1 Mon Sep 21, 2020 9:57 am
No new posts Call Natural program with rexx shahaf CLIST & REXX 2 Tue Sep 08, 2020 11:22 am
No new posts NOT IN clause in COBOL pgm mramvivek COBOL Programming 8 Thu Aug 20, 2020 4:48 am
No new posts Required Date Format in Include Sort ... vivky_vivek DFSORT/ICETOOL 6 Fri Aug 14, 2020 6:52 am

Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us