Re: subscripts in stored procedures.
Posted in 1998
Topics: Stored Procedures & SPL
You don't. You must hard code each possibility in the procedure.
David
"DSL" <dsl@one.net> on 02/11/98 02:10:07 PM
Please respond to "DSL" <dsl@one.net>
To: informix-list@iiug.org
cc: (bcc: David Coburn/ISG/WVUS/WorldVision)
Subject: subscripts in stored procedures.
Does anybody know how to use a variable to subscript a character string in
Informix 5.03 stored procedures? I have had no success, as shown in the
following simple example. Any suggestions would be appreciated.
dsl@one.net
-------------------------------------------------
create procedure subscript_test()define lv_string char(4) default "ABCD";
define lv_ctr smallint;
define lv_char char(1);
let lv_ctr = 2;
let lv_char = lv_string[lv_ctr];
# ^
# 201: A syntax error has occurred.
#
end procedure;
--------------------------------------------------