× 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.



I work on a German IBM i and I had to replace the dot (.) with a comma (,) to make your SQL work:

Before:

IN @pQtyGood dec(9.3),
IN @pQtyScrap dec(9.3),

After:

IN @pQtyGood dec(9,3),
IN @pQtyScrap dec(9,3),

In fact I also had to replace the @ with a §, but that is related to CCSID 1141 and not relevant for your token error.

See also the following example taken from the SQL Reference book:

CREATE PROCEDURE PARTS_ON_HAND (IN PARTNUM INTEGER,
OUT COST DECIMAL(7,2),
OUT QUANTITY INTEGER)
LANGUAGE JAVA
PARAMETER STYLE JAVA
EXTERNAL NAME 'parts.onhand'

Regards,

Thomas.

-----Ursprüngliche Nachricht-----
Von: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] Im Auftrag von THarteau@xxxxxxxxxxxxxxxxxx
Gesendet: Mittwoch, 7. August 2019 21:35
An: rpg400-l@xxxxxxxxxxxxxxxxxx
Betreff: RPG Program as a Stored Procedure

Hi,
I did this back in 2005 and it has been working fine ever since. I
need to set up a similar RPGLE program and create an external stored
procedure, and I keep getting a token error. All the IN and INOUT are
defined as input parameters in my program, and it compiled successfully.
CREATE PROCEDURE V64BPCSUSR/SVLBRTEST
IN @pTransactionNum float,
IN @pRevisionDate varchar(25),
IN @pNRBDX float,
INOUT @pIsOK float,
INOUT @pErrorMessage varchar(255),
IN @pEmployeeId varchar(8),
IN @pDownNote varchar(255)
language RPGLE
specific V64BPCSUSR/SVLBRTEST
not deterministic
modifies SQL
external name V64BPCSUSR/SVLBRTEST
parameter style general

The error I am getting is
Token @PTRANSACTIONNUM was not valid. Valid tokens: :.

Can anyone tell me what I am missing? Thanks!

<===================================================>

Terri Harteau
Felker Brothers Corporation
****************
Practice random acts of kindness and senseless acts of beauty
-Anonymous
****************

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.