Subject: | |
From: | |
Reply To: | VANCE,JEFF (HP-Cupertino,ex1) |
Date: | Wed, 26 Sep 2001 13:30:18 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
> You could type the job type (s/j) or test to see if
> HPINTERACTIVE is true (means that your in a session).
Not entirely correct. The HPINTERACTIVE variable is based
on a call to the FRELATE intrinsic. If $STDLIST and $STDIN
form an interactive pair (meaning that a user can see the
output of $STDLIST on their terminal and can input to the
same terminal) then HPINTERACTIVE is TRUE. Note that
HPINTERACTIVE will be FALSE in scripts run from a session
where $STDIN and/or $STDLIST have been redirected to a file.
I think a more correct way to determine if you are in a
job is to test the HPJOBTYPE variable, e.g.:
if HPJOBTYPE = "J" then
# in a job...
However, if a session is created from within a job, HPINTERACTIVE
will be true, and HPJOBTYPE will be "S" in that session.
To detect this more unusual case, HPTYPEAHEAD can be set to
true. This will work in a "normal session" but will fail with
CIWARN 8174 in a session coming from a job.
Hope this helps some,
Jeff Vance, CSY
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|