Re: HELP: Need work around for STORED PROCEDURE
Posted in 1995
Topics: Installation, Setup & Upgrades, Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL, Jobs, Consulting & Announcements
Peter, You are not the first person to find out about this limitation. Informix has known about it for a long time, but hasn't done anything about it yet. I'm not sure if Informix has upgraded the SPL in newer versions of the engine or not. The problem is you cannot use a variable in subscripting SPL. That is why your subscript [10] is OK, but it blows on "i". If you don't like this limitation, call Informix and maybe they'll add your name too to the list of dozens of people who have previously asked for this. Pat Binkley Senior Consultant Asix, Inc. Seattle WA In article 26c@homer.alpha.net, peter@ems001.emsystem.com (Peter J Diaz de Leon) writes: > I have version 5.02.UC6 of the informix SE engine > and am trying to convert some 4gl code to run in > a stored procedure. I have only run into one problem > so far and that is how do I subscript a character string. > > Example: > > DEFINE i INTEGER; > DEFINE tmp1 CHAR(26); > DEFINE tmp2 CHAR(1); > > LET i = 10; > LET tmp1 = "HOW NOW BROWN COW."; > LET tmp2 = tmp1[i]; -- Syntax error; > LET tmp2 = tmp1[10]; -- NO Syntax error; > > Is is possible to subscript tmp1 in a general way with the > variable i going from 1 to 26? > > By the way I have RTFM, but could not find a way. > > Thanks > Peter > peter@ems001.emsystem.com > > >