[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Is it possible in the Setup section, doing a load-lookup, to use an environment variable?
- Subject: Re: Is it possible in the Setup section, doing a load-lookup, to use an environment variable?
- From: "Johnson, Dan" <Dan_Johnson@WRIGHTEXPRESS.COM>
- Date: Thu, 7 Oct 1999 09:30:18 -0400
Hello Joseph,
Have you tried passing the db name on the command line using ask?
When you say db name do you want to know what database you are running or
what schema you are using? If you want to know the database that your SQL
statements were compiled for you can use the SQR variable $sqr-database.
Hope this helps,
Dan
Please, is it possible to use the getenv() function to get an
environment
variable for use in the Setup section during a load-lookup? I have
tried
many code variations without success. In the following code, I'm
trying top
make the "table=" statement in the load-lookup get the db name from
an
environment variable:
Begin-Setup
Declare-Layout Default
Orientation = Portrait
! Paper-Size = (8.5,10)
Top-Margin = 0.50
Bottom-Margin = 0.50
Left-Margin = 0.20
Right-Margin = 0.20
End-Declare
load-lookup
name=ItemStatus !* Problem Status
table=arcd_n20..tcodedecode <--------- !!!!!!!!!!!!!!! I
want to
use an env. variable here!
key=i_cd
return_value=decode
where='cat=354 and actv_ind=''Y'''
I have tried using the getenv function right in that line, and also
assigning a variable first. Please, if I were to assign a variable
where
would it go and what would it look like?
Thank you to all who responded to my question yesterday regarding
the
environment variables!
thank you