HP3000-L Archives

August 1998, Week 3

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:
Jim Fennell <[log in to unmask]>
Reply To:
Jim Fennell <[log in to unmask]>
Date:
Wed, 19 Aug 1998 21:32:47 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (58 lines)
Here is a command file that tests whether there are sessions logged on in the
group passed to the command file in the ACCOUNT_NAME parameter. You should be
able to put the logic into your job. Replace the ECHO statements at the end
with whatever you want to do in either situation. It's not very pretty, but it
works:

PARM ACCOUNT_NAME
SETVAR SESSACCT_SESSIONSON FALSE
PURGE SESSACFL,TEMP > $NULL
BUILD SESSACFL;REC=-80,,F,ASCII;DISC=10000;TEMP;MSG
SHOWJOB [log in to unmask] > SESSACFL
SETVAR SESSACCT_EOF FINFO("SESSACFL","EOF")
SETVAR SESSACCT_LINENUM 0
WHILE SESSACCT_LINENUM < SESSACCT_EOF AND NOT SESSACCT_SESSIONSON
   SETVAR SESSACCT_LINENUM SESSACCT_LINENUM + 1
   INPUT SESSACCT_LINE < SESSACFL
   ECHO !SESSACCT_LINENUM
   IF "![LFT(SESSACCT_LINE,2)]" = "#S" THEN
      SETVAR SESSACCT_SESSIONSON TRUE
   ENDIF
ENDWHILE
IF SESSACCT_SESSIONSON THEN
   ECHO There are sessions currently logged on in the !ACCOUNT_NAME account
ELSE
   ECHO There are NO sessions currently logged on in the !ACCOUNT_NAME account
ENDIF
DELETEVAR SESSACCT_@
PURGE SESSACFL,TEMP > $NULL

Feel free to email any questions.

Jim Fennell
Systems Analyst
InterPay inc.
  Payroll the Smart Way

Email: [log in to unmask]

[log in to unmask] wrote:

> My company has a Stream Job on our HP3000 that can only run if all SESSIONS
> are logged of a specific account.  The problem is the only way we know to
> check to see if there is any sessions logged on is to use the HP variable
> HPSESCOUNT in a IF test (IF HPSESCOUNT = 0 THEN ...) in a stream job.
>
> This works 90% of the time except when a person forgets to log off the
> console.  Does anybody know of a way to check for SESSIONS (Not Jobs) in a
> specific account tha can be used like the above IF test.
>
> Thanks in advance
>
> Patrick K. Faloney
> Systems Analyst
> STB Systems
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

ATOM RSS1 RSS2