Arrays of Characters in SPL
Posted in 1999
Topics: Stored Procedures & SPL
I hope I'm just doing something stupid, but I cannot seem to
define an array of character variables in SPL. My objective
is to select a bunch of data into an array and then use specific
positions in the array for various calcs.
Working in INFORMIX-SE 7.24.UC6, I am trying to create a
stored procedure, and I get a murky error message. The
syntax looks right to me. What am I missing?
create procedure updannpcalcs ( p_cusip char(8) )
define p_yrqtr array [20] of char(6);# ^
# 201: A syntax error has occurred.
#
define p_pda_yr array [20] of smallint;
define p_pda_yr array [20] of smallfloat;
define p_pda_yr array [20] of smallfloat;
define i smallint;
TIA
The keywords "ARRAY OF" are 4GL syntax. There are no arrays in SPL.
Art S. Kagel
KONE wrote:
>
> I hope I'm just doing something stupid, but I cannot seem to
> define an array of character variables in SPL. My objective
> is to select a bunch of data into an array and then use specific
> positions in the array for various calcs.
> Working in INFORMIX-SE 7.24.UC6, I am trying to create a
> stored procedure, and I get a murky error message. The
> syntax looks right to me. What am I missing?
>
> create procedure updannpcalcs ( p_cusip char(8) )
> define p_yrqtr array [20] of char(6);> # ^
> # 201: A syntax error has occurred.
> #
> define p_pda_yr array [20] of smallint;
> define p_pda_yr array [20] of smallfloat;
> define p_pda_yr array [20] of smallfloat;
> define i smallint;
>
> TIA
"Art S. Kagel" wrote:
>
> The keywords "ARRAY OF" are 4GL syntax. There are no arrays in SPL.
And if I had a nickel for every minute that I have spent wishing there
were SPL arrays.....I'd be a rich DBA...............
aj
> Art S. Kagel
>
> KONE wrote:
> >
> > I hope I'm just doing something stupid, but I cannot seem to
> > define an array of character variables in SPL. My objective
> > is to select a bunch of data into an array and then use specific
> > positions in the array for various calcs.
> > Working in INFORMIX-SE 7.24.UC6, I am trying to create a
> > stored procedure, and I get a murky error message. The
> > syntax looks right to me. What am I missing?
> >
> > create procedure updannpcalcs ( p_cusip char(8) )
> > define p_yrqtr array [20] of char(6);> > # ^
> > # 201: A syntax error has occurred.
> > #
> > define p_pda_yr array [20] of smallint;
> > define p_pda_yr array [20] of smallfloat;
> > define p_pda_yr array [20] of smallfloat;
> > define i smallint;
> >
> > TIA