SPL automatic data type conversions.
Posted in 1998
Topics: Stored Procedures & SPL, Server Administration, Data Types & Schema Design
Informix SQL 6.04
SCO Unix 5.0.2
/bin/sh
A more evil combination has probably never existed, but....
I am trying to call a SPL procedure from within a script, and pass two
integer values. HOWEVER SPL seems to want to automatically convert them
to characters before processing it.
So I need to know how to:
1) Stop this senseless conversion.
2) Find a way to re-cast the values from within SPL.
Here is a snippet of code:
/bin/sh:
echo "execute procedure reprint (655351, 21842);" |dbaccess database -
{I have tried embedding these expressions in single and double quotes}
SPL:
create procedure reprint(acc_code char(6), dao char(8)){I have tried INT, DATE and CHAR.}
define E,X,Y,Z integer;
define YR, MO, DA char(2);
define daoi integer;
LET daoi = dao;
LET YR, MO, DA, X = (select YEAR(invdate), MONTH(invdate), DAY(invdate),
mst_link from archive_mst where accsscode = acc_code and dateout = daoi);
system 'cd /tmp; echoi '||YR||'.'||MO||'.'||DA||'/'||X||
'.Z inv.out >> /tmp/errtest';
end procedure;
HELP!
BTW: Yes, I know.... getting the developers edition at least GCC would
make my life insanely easier....
-Don
macphee@ids.net
Email preferred.
--
Don Mac Phee macphee@ids.net | No I do not want to know...
'Anything but late for supper.'| For a minute there I thought we were in
trouble.
-----------------