[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Create-Array/ Precompile question



The create-array command can be executed EITHER within the setup section or
within the body of a procedure.  The thing that I think is causing the
problem is the size parameter can be a variable but unfortunately, it must
be a substitution variable, therefore requiring the ask command.


Paul Hoyte
Sharidionne, Inc.
(248) 559-6868
www.sharidionne.com
phoyte@sharidionne.com

-----Original Message-----
From: Discussion of SQR, Brio Technology's database reporting language
[mailto:SQR-USERS@list.iex.net]On Behalf Of Glenn Jensen
Sent: Thursday, January 04, 2001 10:47 AM
To: SQR-USERS@list.iex.net
Subject: Create-Array/ Precompile question


Hi All!

I'm looking at a PeopleSoft SQR that uses, what I think to be, a
questionable approach to creating arrays;  they attempt to conditionally
create arrays based on user input.  Every book and document I've been able
to find on the subject specifically mentions that arrays are created during
a precompile stage - before user input ever occurs.  My own experience
confirms this.  Whether the create-array command is in a procedure that's
never called, or the create-array command sits within an unsatisfied
conditional statement in the body of the program the array is still
created...as expected.

Is this a leftover from previous versions of SQR?  I'm not an SQR expert, so
is there something I'm missing?  Ugh.

We're currently running:
SQR/4.3.4/PC/Windows NT 4.0/Oracle 7.3.4

A snippet of code from the body of the program looks like this:

  if $Update_Mode = 'Y'
     create-array name=xref_balance_changed size = 100000
                  field=Bus_unit:char='Unknow'
                  field=Emp_ID:char
                  field=Ext_org:char
                  field=Item_Nbr:char
                  field=Item_amt:number=0.00
                  field=Bal_Amt:number=0.00
                  field=Xref_amt:number=0.00
                  field=Line_sum:number=0.00
  end-if

when $update_mode = 'N' the array is still created, and moreover it's
created even before $update_mode is input.

Thanks!
Glenn