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



In either way is the separator in SQL a comma an not a Period!
As Thomas said, Decimal parameters/columns have to be defined with a comma
as separator!

... and just in case you'd work with a decimal comma, you should always add
a blank after the comma separator in SQL.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)


-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Thomas
Raddatz
Sent: Donnerstag, 8. August 2019 07:48
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: RPG Program as a Stored Procedure

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
****************
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying, distribution, or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and email confirmation to the
sender.

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

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.