× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Chuck,

When I said there is nothing else in the joblog, I meant it. The joblog
only has this message and I looked, but there are NO spoolfiles
(QPDSPJOB,QPSRVDMP) for the error.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Friday, September 27, 2013 3:45 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Creating a SQL UDF

On 27 Sep 2013 05:29, Robert Mullis wrote:

I was using the OPDESC to retrieve the current length of the varying
parm passed in using CEEGSI. I removed that and replaced it with the
%LEN BIF and now it at least calls my procedure. Unfortunately when my

procedure returns, I get this cryptic message from SQL (I am testing
using STRSQL):

Function error X'0306' in machine instruction. Internal dump
identifier (ID) 0100A758.

The invocation effected a VL02000306 [VLIC log 0200 0306}. The
following request would spool the dump [though probably not much use to
hardly anyone but the IBM support\development]::
PRTINTDTA *DMP DMPID(0100A758)

There is nothing else in my joblog, but this message.

Seems improbable. And FWiW the "this message" has an identifier...
MCH3203. The partial symptom is msgMCH3203 rcX0306, but for lack of the
spooled joblog, but there is missing context; i.e.. the failing LIC
program name and instruction and the program\procedure\statement that
invoked that LIC method are in the [spooled] joblog. Plus there may
have been additional spool data produced, in association with the
failure; e.g. a QPDSPJOB and\or QPSRVDMP.

This is how I defined my UDF:

Create Function RMULLIS/RmvNonAlph(VarChar(1000),VarChar(1))
Returns VarChar(1000)
Language RPGLE
External Name 'RMULLIS/SYSRVUTL(REMOVE_NON_ALPHANUMERIC)'
Deterministic
No SQL
Parameter Style General
Allow Parallel
No External Action

According to the prototype in the OP, presuming only the OPDESC
keyword was removed, the CREATE FUNCTION is not valid; i.e. the UDF can
not be defined that way, because that does declarative for the SQL
interface to the program does not match the actual program. Either the
"wrapper" or the "sourced function" [mentioned in prior replies in this
thread] must be utilized to enable the VARCHAR(1) as the second
parameter using the PARAMETER STYLE GENERAL... or the program must be
changed besides omitting the OPDESC keyword, to declare the second
parameter as /varying/ character data.

Any ideas on what might cause this error?

If there is a parameter mismatch [as alluded just above seems
possibly to be the case per no explicit mention of the required code
change], then that incorrect definition may be what gives rise to the
LIC error. There is a limited ability of the SQL to ensure validity;
i.e. the user is almost fully entrusted with [responsible for] making
the proper declarative to define the interface between the SQL and their
program.

--
Regards, Chuck
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.