MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » July 2013

Re: SQL SP - Using Decimal (8,6) for Parameters



fixed

Thanks Jon...that's what I thought. I wonder if it has to do with the SQL
plan (which I know is there, it's important, and I don't know enough about
it).


On Fri, Jul 12, 2013 at 11:05 AM, Jon Paris <jon.paris@xxxxxxxxxxxxxx>wrote:

Nope DECIMAL is packed in RPG. NUMERIC is zoned.

Sorry - hopefully one of the SQL gurus can spot something - looks OK to me.


On 2013-07-12, at 10:52 AM, Michael Ryan <michaelrtr@xxxxxxxxx> wrote:

Thanks Jon...I wonder if DECIMAL in SQL is different than packed (parm
list
- right?) in RPG...

Here's the stored procedure Generate SQL:

CREATE PROCEDURE NEWSYS/GETTAX010R (
IN INZIP CHAR(6) ,
OUT OTCITY CHAR(25) ,
OUT OTGST DECIMAL(8, 6) ,
OUT OTPST DECIMAL(8, 6) ,
OUT OTHST DECIMAL(8, 6) ,
OUT OTSTTAX DECIMAL(8, 6) ,
OUT OTCNTAX DECIMAL(8, 6) ,
OUT OTCTYTAX DECIMAL(8, 6) ,
OUT OTTOTTAX DECIMAL(8, 6) ,
OUT OTNFERR CHAR(2) )
LANGUAGE RPGLE
SPECIFIC NEWSYS/GETTAX010R
NOT DETERMINISTIC
READS SQL DATA
CALLED ON NULL INPUT
EXTERNAL NAME 'NEWSYS/TAX010R'
PARAMETER STYLE GENERAL ;

And the parms in the RPG:

D Wsv350R PI
D pInPostalCode 6A
D pInCityName 25A
D pOtGST 8 6
D pOtPST 8 6
D pOtHST 8 6
D pOtStTax 8 6
D pOtCnTax 8 6
D pOtCtyTax 8 6
D pOtTotTax 8 6
D pOtNFErr 2A

and the embedded SQL Call (WSV350R calls the SQL):

Exec Sql
Call NEWSYS.GETTAX010R(:pInPostalCode,
:pInCityName,
:pOtGST,
:pOtPST,
:pOtHST,
:pOtStTax,
:pOtCnTax,
:pOtCtyTax,
:pOtTotTax,
:pOtNFErr);


On Fri, Jul 12, 2013 at 10:44 AM, Jon Paris <jon.paris@xxxxxxxxxxxxxx
wrote:

Michael - saying "decimal parameters" is only part of the picture. Can
you
show us the definition and the call? It sounds like a signature error
so
I'm guessing that something you think is packed is actually zoned or
vice-versa.


On 2013-07-12, at 9:40 AM, Michael Ryan <michaelrtr@xxxxxxxxx> wrote:

I'm having trouble calling a stored procedure (i to i) that's using
decimal
parameters. I'm getting an SQL0204 - Not Found - when it's clearly
there. I
can call another SP that's defined the same way (calling a different
program with all character parms), and that works fine. I know that if
an
SP won't be found if it isn't called with the right parms, and I'm
thinking
I'm running into that for some reason. Anyone have any ideas why (or
if)
specifying decimal parms would matter? Thanks!
--
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,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com




--
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,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
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,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com




--
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,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.







Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact