Subject: | |
From: | |
Reply To: | |
Date: | Wed, 19 Aug 1998 11:44:38 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Patrick Faloney 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.
How about adding a few lines to your job stream:
!SHOWJOB [log in to unmask] > SHOWFILE
!GREP.HPBIN.SYS "-i '#S'" < SHOWFILE > SESSFILE
!IF FINFO ( "SESSFILE", "EOF" ) <> 0
! TELLOP THERE ARE STILL USERS LOGGED INTO "ACCOUNT"
! TELLOP PLEASE ABORT THEM AND RE-RUN THIS JOB!
! EOJ
!ENDIF
SHOWFILE and SESSFILE are temporary files and will dissappear as
soon as the job logs off, and the 'GREP' command (Global Regular
Expression Printer) will only put lines containing '#S' into the
SESSFILE, so if that's empty, only JOBS are logged in!
HTH!
+-------------------------------------------------------------------+
My mind is my own, as are my ideas and opinions.
My heart, body, and soul, however, all belong to others. Tim.
+-------------------------------------------------------------------+
Tim Ericson tericson DenKor Dental Management Corp.
Sr. Programmer/Analyst at denkor 503-526-4440 (my direct number)
(& Systems Manager) dot com http://www.denkor.com
Programming HP3000s since 1983! Quality dental care since 1970!
+-------------------------------------------------------------------+
UDCs and Command Files: http://www.denkor.com/hp3000/command_files
+-------------------------------------------------------------------+
|
|
|