Subject: | |
From: | |
Reply To: | |
Date: | Thu, 6 May 2010 11:22:24 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On 5/6/2010 11:05 AM, Walter J. Murray wrote:
> Greetings,
>
> Is there a clean way to determine, either in a command file or
> programmatically, whether I am running in batch?
>
> OK--don't say to simply check the variable HPINTERACTIVE or HPJOBTYPE.
>
> Those don't do what I want if we are in a "session" that was created by
> a REMOTE HELLO from a batch job on a remote machine. I want a way to
> know that this "session" is really "batch".
>
Hrmm... that vaguely jogs an old memory....
> comment ** If origin is a session (VT or otherwise) we will setup
> comment ** some Reflection and local parameters. If this is a VT
> comment ** session initiated by a job, we DON'T want to since the
> comment ** status read will swallow the job's next $STDIN record.
> comment ** Only way to test this is trying to set hptypeahead true
> comment ** which fails if the origin is a batch job
> setvar hpmsgfence 2
> setvar hpcierr 0
> setvar savetype hptypeahead
> continue
> setvar hptypeahead true
> if hpinteractive and hpcierr = 0 then
And if you want to know if the origin was a telnet session...
> if hplocport=23 then
Does that help?
Jeff
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|