SYSTEMVAL query

Jones Allen (Van) Allen.Jones@vpgroup.com
Wed, 4 Apr 2001 15:14:22 -0700


I think the problem is that the variable is set in a sub-process, not the
process that QUIZ is running in.  For example:

> def x char*1 = "Y" if setsystemval("FOO","BAR")
> def y char*10 = getsystemval(FOO)
> report x
> go
01/04/04                          VantagePoint                         PAGE
1

  X  Y

  Y  BAR

Records selected:  0
Lines printed:     3
Pages printed:     1

> !echo $FOO
BAR
> exit
$ echo $FOO
ksh: FOO: parameter not set
$ 

Notice that as long as you're in QUIZ, the value of $FOO is available.  (I'm
not sure why your GETSYSTEMVAL didn't work.)  Try placing the value in a
file using echo:

> !echo FOO=$FOO > out

Then when you leave QUIZ, do the following:

$ chmod +x out
$ . out
$ env|grep FOO    ...or... echo $FOO

The file "out" should hold FOO=BAR and the last statement will show you how
$FOO is set.  If you want more lines in file "out", use >>, not > in your
!echo statement.  I haven't tried this with a compiled QUIZ report, the
!echo is executed immediately.

-----Original Message-----
From: Madeleine D. [mailto:mmdrake@bctonline.com]
Sent: Wednesday, April 04, 2001 1:48 PM
To: powerh-l@lists.swau.edu
Subject: SYSTEMVAL query


Has anyone experience with using SETSYSTEMVAL to setup an environment
variable in HP-UX/Oracle/PH8?  We need to read some tables in Quiz, set the
variables and then return to a script to retrieve the settings.

This is what we have tried in various forms:

DEF T_HOME CHAR*20 = BRIDGE_VALUE OF PARAMS
DEF T_OKAY CHAR*1 = "Y" IF SETSYSTEMVAL("SALHOME", T_HOME) ELSE "N"

No matter what, when we come out of Quiz, the var is blank, even though
T_OKAY ends up with a 'Y'.  If we try to read the variable in Quiz with a
GETSYSTEMVAL, we get '50236020', which is definitely not the value
retrieved (CHAR data in table).

We've reviewed the PH manuals in depth, and the OSAccess parameters are not
an issue.  We've also tried reading directly from the field in the table.
Same results.

Any help is much appreciated.

thanks
mmd


= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.