View previous topic :: View next topic
|
Author |
Message |
Kirthishine
New User
Joined: 26 Jun 2020 Posts: 1 Location: India
|
|
|
|
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 |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
What is the format in the COBOL for VSE manual? |
|
Back to top |
|
 |
lchui
New User
Joined: 10 Jun 2020 Posts: 7 Location: Canada
|
|
|
|
(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 |
|
 |
Jose Mateo
Active User
Joined: 29 Oct 2010 Posts: 121 Location: Puerto Rico
|
|
|
|
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 |
|
 |
|