Hi David,
Thank you for your inquiry.
The most likely issue is the function definition in LMi.
The function is described with an extended attribute of
SQL when it is pointing to an
EXTERNAL NAME 'UTLGENS(getGUID)'
To correct: 16=ChangeExtended attribute . . . EXTI also recommend hard-coding the "specific name"...
LANGUAGE RPGLE SPECIFIC UTLGUIDD
EXTERNAL NAME...
Please keep us informed of your progress.
Best regards
Jay
------------------------------
Jay Mikaiel
Senior Technical Support Engineer
Rocket Software
UK
------------------------------
Original Message:
Sent: 12-01-2021 16:31
From: David Taylor
Subject: SQL User defined function
Here are the details: I created the object on my task as an SQL Function as PSEUDO source as required.
UTLGUIDD *FUNCTN SQL HZN/BAS D DEVDTAYL. The source member name is not the same as the UDF name and that was defined. See Function Name below. I can compile the source with RUNSQLSTM from a command line. When I attempt to compile within the system, I get an error on the report. I looked in the job log for the error, but there is a lot to sort out. What am I missing? TIA.
ASQFUNCTN FUNCTION(LMIDTAYL/UTLGUIDD) SRCFILE(LMIDTAYL/UTLSRC) SRCMBR(UTLGUIDD)
CMS2361 30 *FUNCTN UTLGUIDD created, but not in accord with SQL extended attribute.
Object (specific name) : UTLGUIDD
Type . . . . . . . . . : *FUNCTN
Function name . . . . : GETUID
Release . . . . . . . : RANGE/HORIZON/BASE
Ext Dta Scan Object ------------------ Source ----------------
Environment Release Attribute Attr Opt Version Status Library Library File Member Type
============== ========== ========== === === ======== ======== ========== ========== ========== ========== ======
PDN *NOT RES *SAME HZNBASPDN HZNBASPDN UTLSRC UTLGUIDD
Object library group: 9 ALL OBJECTS AND SOURCE FOR RNGMNTLIB
Source library group: 9 ALL OBJECTS AND SOURCE FOR RNGMNTLIB
QUA *NOT RES *SAME HZNBASQUA HZNBASQUA UTLSRC UTLGUIDD
ITG *NOT RES *SAME HZNBASITG HZNBASITG UTLSRC UTLGUIDD
DVP DEVDTAYL *SAME SQL SQL PRM 00000000 *NOT CUR LMIDTAYL LMIDTAYL UTLSRC UTLGUIDD Pseudo
Tasks . . . . . . . . . :
DAVIDTEST2
Object text . . . . . . :
Create command . . . . : ASQFUNCTN FUNCTION(LMIDTAYL/UTLGUIDD) SRCFILE(LMIDTAYL/UTLSRC) SRCMBR(UTLGUIDD)
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....0....+....1....+....2.
5770SS1 V7R3M0 160422 Run SQL Statements UTLGUIDD 12/01/21 15:15:32
Record *...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 SEQNBR Last change
1 CREATE OR REPLACE FUNCTION Z_PD6105 /GETUID ( ) RETURNS CHAR(36) LANGUAGE RPGLE
2 EXTERNAL NAME 'UTLGENS(getGUID)' PARAMETER STYLE GENERAL PROGRAM TYPE SUB ;
* * * * * E N D O F S O U R C E * * * * *
5770SS1 V7R3M0 160422 Run SQL Statements UTLGUIDD 12/01/21 15:15:32
Record *...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 SEQNBR Last change
MSG ID SEV RECORD TEXT
SQL7997 0 1 Position 1 Function GETUID was created in Z_PD6105.
Message Summary
Total Info Warning Error Severe Terminal
1 1 0 0 0 0
00 level severity errors found in source
------------------------------
David Taylor
Senior Developer
Range Resources Corporation
Fort Worth TX US
------------------------------