jared wrote:
> 
> I'm trying to compile a COBOL program that CALLs a C procedure and uses
> the RETURNING clause, but I keep getting the following compile error:
> 
> ---
>  Message . . . . :   A CALL statement expected a return value from a
>    program that does not return a value or visa versa.
> ---
> 

If you compile with OPTION(*SECLVL) you can get more information on the
message.  Looks like you need something in the PROCEDURE division.

LNC2757                                                                      
  Message . . . . :   A CALL statement expected a return value from a
program
    that does not return a value or visa
versa.                              
  Cause . . . . . :   A CALL statement specified a GIVING/RETURNING
phrase for
    program &1, that does not return a value, or the CALL statement did
not have
    a GIVING/RETURNING phrase but the program returns a
value.               
  Recovery  . . . :   If a program returns a value, from the PROCEDURE
DIVISION
    header RETURNING phrase, the CALL statement must specify a
GIVING/RETURNING
    phrase. If a program does not have a PROCEDURE DIVISION header
RETURNING 
    phrase then the CALL statement should not have a GIVING/RETURNING
phrase.

You might get more information on the COBOL list.


This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].