My guess David, is that when you execute your CALL SYSTEM command, you are envoking a secondary command shell and once this shell exits (when control is returned to SQR) the secondary environment with you variable get blown away and when you do the GETENV, you are querying the primary command shell, which never had the environment variable MODE_TEST.
Have you tried to set the MODE_TEST environment variable within your default environment profile so that it is set all the time? (I'm no VMS guru, but I have had this problem on other platforms).
Later...
Rob
-----------------------------------------------------------
Through the NIC... Over the twisted pair...
Off the Router... >>SWISH<<... Nothing but NET!
-------------------+-------------------+-------------------
Robert Goshko | rgoshko@ibm.net | (403) 417-AXIS
Axis Developments | | Sherwood Park, AB
-----Original Message-----
From: David Stanley SICAS Center [SMTP:stanledd@SNYONEVA.CC.ONEONTA.EDU]
Sent: Monday, January 05, 1998 4:43 AM
To: Multiple recipients of list SQR-USERS
Subject: INTERACTIVE AND BATCH modes
Hi...
I'm working with an Alpha with VMS 6.1 with SQR 3.12...
The problem I'm having is this:
I would like to call the system to retrieve the F$MODE()
status to find if the env is "Ineractive or Batch". I've played
around with this a bit and seam to be getting puzzled. Has anyone
else worked thru this???
My code so far goes as follows:
let $system_call = 'IF F$MODE() .NES. 'BATCH' THEN
MODE_TEST:="INTERACTIVE" '
call system using $system_call #status
let $mode = getenv('MODE_TEST')
..
..
..
I've also tried let $system_call = 'MODE_TEST:=F$MODE()'
The main issue is that the SYMBOL MODE_TEST doesn't seam to be
getting assigned. I've debuged the code to see what's getting what
and everything appears to be fine.
Thanx for any input in advance
David Stanley Lead Programmer
SICAS Center SUNY Oneonta
If you take a shovel and start digging, you will eventaully be standing in a hole.
stanledd@oneonta.edu
http://www.oneonta.edu/~stanledd/
Unrecognized Data: application/ms-tnef