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:
Tim Ericson <[log in to unmask]>
Reply To:
Tim Ericson <[log in to unmask]>
Date:
Wed, 19 Aug 1998 11:44:38 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (37 lines)
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
 +-------------------------------------------------------------------+

ATOM RSS1 RSS2