Sure, an easy way to do this is with a temporary file.  Here is an example
we use for one of our processings

!JOBCARD GOES HERE
!PURGE SJ809,TEMP
!SHOWJOB JOB=B049809,MANAGER.!HPACCOUNT > SJ809
!SETVAR NUMRECS FINFO('SJ809',19)
!IF NUMRECS = 6
! then do something or other.
! IF NUMRECS > 6
!   TELL OPERATOR.FACILITY;****************************************
!   TELL OPERATOR.FACILITY;*                                      *
!   TELL OPERATOR.FACILITY;*  !HPJOBNAME, ALREADY RUNNING IN      *
!   TELL OPERATOR.FACILITY;*  !HPACCOUNT - IT IS "NOT" NECESSARY  *
!   TELL OPERATOR.FACILITY;*               TO NOTIFY THE ON-CALL  *
!   TELL OPERATOR.FACILITY;*               PROGRAMMER             *
!   TELL OPERATOR.FACILITY;*                                      *
!   TELL OPERATOR.FACILITY;****************************************
!   TELL OPERATOR.FACILITY;
! ENDIF
!ENDIF


Note that six records in the file indicates that the job is not running,
there would be more than 6 if it was.  While this approach checks for a
single job, it is easy modified to do it for an entire account.

Gary L. Paveza, Jr.
Technical Support Specialist
All opinions are mine and not those of my employer

        -----Original Message-----
        From:   [log in to unmask] [SMTP:[log in to unmask]]
        Sent:   Tuesday, August 18, 1998 4:09 PM
        To:     [log in to unmask]
        Subject:        Session Checking for a Specific Account

        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