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:
"Michael P. Smith" <[log in to unmask]>
Reply To:
Michael P. Smith
Date:
Wed, 19 Aug 1998 16:38:02 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (108 lines)
Also,

  If you don't have MPEX you can write a simple command file to find out the
same information.  An example of a JSCOUNT command file is as follows:

parm p1="@.!hpaccount"
if not bound(_jscount_useracct)
 setvar _jscount_useracct UPS("!p1")
 setvar _jscount_messages UPS("!p2")
 file jscountx=jscountx;temp;rec=-80,1,f,ascii;nocctl;disc=5000
 continue
 purge jscountx,TEMP > $NULL
 showjob job=!_jscount_useracct;EXEC >>*jscountx
 jscount < *jscountx
 continue
 purge jscountx,TEMP > $NULL
 reset jscountx
 deletevar _jscount_@
else
 setvar jscount_sessions 0
 setvar jscount_jobs     0
 if finfo("*jscountx","eof")=3 then
  return
 endif
 input _jscount_junk
 input _jscount_junk
 input _jscount_junk
 setvar _jscount_record "#"
 while lft(_jscount_record,1)="#"
  input _jscount_record
  if str(_jscount_record,2,1)="S"
   setvar jscount_sessions jscount_sessions + 1
  elseif str(_jscount_record,2,1)="J"
   setvar jscount_jobs     jscount_jobs + 1
  endif
 endwhile
 return
endif

To check for all users in the SYS account when one user is signed on would
show up as follows:

:jscount @.SYS
:showvar jscount_@
JSCOUNT_SESSIONS = 1
JSCOUNT_JOBS = 0

Admittedly the command file is kludgy at best, but it would get the job done
if you didn't have MPEX.  Of course, if you wanted to check multiple
accounts you would have to call this command file multiple times and keep
your own running total.

 ---------------------------------------------------------------
| Michael P. Smith                                              |
| Sr. Systems Programmer                                        |
| The Hertz Corporation    [log in to unmask] (work)          |
| Oklahoma City, OK        [log in to unmask] (personal)      |
 ---------------------------------------------------------------
The thoughts, views and expressions contained in this message are those
of Michael P. Smith, and do not necessarily reflect those of the Hertz
Corporation.  To reply via email, remove the .xx from email address.

[log in to unmask] wrote in message <[log in to unmask]>...
>Patrick,
>
>you can do what you want to do in MPEX as follows:
>(In this example "acct" = account name).
>
>:MPEX
>% setvar sessions = jscount("@.acct&online")
>% exit
>if sessions = 0 then
>  stream jobname
>endif
>
>
>************
>Hope this helps you.
>Steve Zink
>Beyond Y2K, Inc.
>([log in to unmask])
>
>In article <[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
>>
>
>-----== 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