Thank you for that information.  On the system where I have access to V6.4 it 
looks like we only have as far as the June 2023 refresh:

PP 5655-EC6 IBM Enterprise COBOL for z/OS  6.4.0 P230615

I will wait for the latest level to be applied and try again then.

Do you happen to have a link to the APAR description? I presume there is a 
coordinated documentation update as well.

Peter

From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Frank Swarbrick
Sent: Friday, February 2, 2024 2:40 PM
To: [email protected]
Subject: Re: Ent. COBOL User-defined function question


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]<mailto:[email protected]>> on behalf of Peter 
Farley 
<[email protected]<mailto:[email protected]>>

Sent: Thursday, February 1, 2024 9:50 AM

To: [email protected]<mailto:[email protected]> 
<[email protected]<mailto:[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

--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to