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