Calling PL/SQL stored procs
Jon Kvisli
jon.kvisli@lindorffapplications.com
Tue, 21 Oct 2003 10:05:47 +0200
Having converted from PH/Image/HP3000 to PH/Oracle/HP-UX, we are gradually moving business logic from PH code to Oracle stored procs (Java and PL/SQL).
For some days now, I have struggeled with passing decimal numbers as parameters from QUICK to PL/SQL procedures, and I'm hoping for å good tip.
The problem is that PH seems to truncate the numbers to integers even though the TEMPs used as parameters, are declared to be datatype FLOAT (or NUM).
The parameters are declared as Oracle datatype NUMBER in the stored procs:
PROCEDURE MyProc ("in_p1" IN NUMBER) AS LANGUAGE JAVA
NAME 'javastoredproc.some_class.MyProc(double)';
The PH documentation describes float size 8 ar the equivalent of Oracle NUMBER, and the PH parameter is declared at float size 8:
temporary T_P1 float size 8 initial 0 ; also tried NUM*6 with same result
.
.
LET T_P1 = 550 / 100
sql call some_class.MyProc (T_P1 in )
The TEMP T_P1 passed as 5 not as 5.50.
Am I missing some basic things about how PH datatypes works here?
Regards
Jon Kvisli
----------------------------------------------
Principal Consultant
Lindorff Applications as
Hellandtunet research- og businesscentre
P.O.Box 4, 3833 Bo in Telemark
phone: +47 35 06 15 71
fax: +47 35 06 15 01
mail: jon.kvisli@lindorffapplications.com
www.lindorffapplications.com
----------------------------------------------