Wow. Thanks so much, Chuck. That indeed worked. I never saw that in any
I'm not going to waste time trying to figure out why it worked without the
library reference and the apostrophes on our v7 and v5 boxes.
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Sunday, November 25, 2012 5:03 PM
Subject: Re: Why won't this CREATE FUNCTION command work?
I am too lazy presently to locate any specifics [beyond to suggest
reviewing second level text from DSPMSGD SQL0449 QSQLMSG], but the solution
is likely both to ensure the proper PATH is established before issuing the
CREATE request and\or to specify the external name within apostrophes [as
delimiters] along with including the library name. Thus on the
second-to-last line, specifying the following should resolve:
EXTERNAL NAME 'TheLibraryName/DATE2ISO(DATE2ISO)'
Or as an old-release copy of the text for the -449 sqlcode suggests, "The
external program name for a procedure or function must be of the form
On 25 Nov 2012 15:46, Thomas Garvey wrote:
We have this function, which is written in RPGLE in the form of a
module in a service program. The following CREATE FUNCTION works fine
on our v7r1 system and our v5r4 system. However, when we run it on our
client alpha test site (also v5r4), it fails.
CREATE FUNCTION LIBRARY/DT2ISOSRV (
TESTVALUE VARCHAR(50) ,
DATEFMT VARCHAR(4) )
CALLED ON NULL INPUT
NO EXTERNAL ACTION
EXTERNAL NAME DATE2ISO(DATE2ISO)
PARAMETER STYLE GENERAL ;
Here's the error...
Token ( was not valid. Valid tokens: IS NO NOT NULL ALLOW FINAL READ
The cursor is positioned on the left paren in the second to last line
of the command.
This specification is necessary to identify the procedure and service
program name when the parameter style is general. The service program
is named DATE2ISO and the procedure in that service program is
DATE2ISO. The function, when used in embedded SQL statements, is
DT2ISOSRV. Like I said, it works on two different systems. But not on
our alpha site.
Any ideas what could be different between the systems? This is a
showstopper for us.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l