WalterR wrote:
Bill Klein wrote:
Although the '02 ANSI/ISO Standard does allow for "user-defined"
functions,
these are NOT supported by current releases of IBM's Enterprise COBOL.
(Some vendors of Windows and Unix COBOL compilers do already support it).
On the other hand, ....
What do you mean by a "function"?
If you want to create a COBOL subprogram that takes in parameters and
RETURNS a value, then just look at the "Returning Phrase" of the
Procedure
Division header. See:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy3lr31/6.1.2.2
Although a COBOL program cannot use such a program as a function i.e.
FUNCTION user-name, it is quite possible that NON-COBOL applications
can use
it.
If you are looking for something that can be used by a COBOL program,
then
why do you need a FUNCTION instead of a subprogram?
"Carl Edwards" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
We have a need to write one or more FUNCTIONS in
COBOL, to date we have been unable to find any
reference to doing such. Does anyone know if this can
be one? Has anyone done it? Several members of the
staff say it can be doen, but are unable to show any
documentation on it.
TIA
Can PL/I functions be referenced as COBOL functions?
If the PL/I side had a ... FUNCX: PROC RETURNS(<data format>); linked
NCAL, could the the COBOL side use the FUNCX-TARGET = FUNCTION
FUNCX(...). syntax? In this case, would COBOL require some kind of
function definition (separate statement)?
Walter Rue
PL/I functions may be referenced as subroutines from a COBOL
program. Properly coded COBOL subroutines may be referenced
as functions from a PL/I program.
Kind regards,
-Steve Comstock
The Trainer's Friend, Inc.
303-393-8716
http://www.trainersfriend.com
z/OS Application development made easier
* Our classes include
+ How things work
+ Programming examples with realistic applications
+ Starter / skeleton code
+ Complete working programs
+ Useful utilities and subroutines
+ Tips and techniques
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html