What fix level are you at? October 2023's PTF closes APAR PH57397, which adds "function prototypes". I think you would have the appropraite prototype defined before the program/function where it is used. Best done with a COPY statement.
Prior to this fix level I think your results are working as designed. Frank ________________________________ From: IBM Mainframe Discussion List <[email protected]> on behalf of Peter Farley <[email protected]> Sent: Thursday, February 1, 2024 9:50 AM To: [email protected] <[email protected]> Subject: Ent. COBOL User-defined function question Using the listserv web interface for the first time, so I hope this goes through OK. In testing the new V6.4 user-defined functions capability I have found that it seems you cannot have a separately-compiled-and-linked user-defined function. If you separately compile and link the function for dynamic load and execute by other programs, the other programs cannot just have a REPOSITORY paragraph that names the function - the function source code seems to be required as part of the using-program compile, otherwise you get an error message. Example error message: 000001 IDENTIFICATION DIVISION. 000002 PROGRAM-ID. FUNCTSTM 000003 ENVIRONMENT DIVISION. 000004 CONFIGURATION SECTION. 000005 REPOSITORY. 000006 FUNCTION TST1FUNC 000006==> IGYDS0301-E "TST1FUNC" was specified in the "FUNCTION" phrase of the "REPOSITORY" paragraph, but it is not the name of an user-defined function. The phrase was discarded. Does this mean that user-defined source code must always be included when compiling programs that want to use these functions? That seems less than useful to me because then there is no way to maintain such functions independently of the programs that use them. TIA for any insight you can offer. Peter ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
