HP3000-L Archives

September 2001, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"VANCE,JEFF (HP-Cupertino,ex1)" <[log in to unmask]>
Reply To:
VANCE,JEFF (HP-Cupertino,ex1)
Date:
Wed, 26 Sep 2001 13:30:18 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
> 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 *

ATOM RSS1 RSS2