HP3000-L Archives

May 2002, Week 5

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 Anderson <[log in to unmask]>
Reply To:
Michael Anderson <[log in to unmask]>
Date:
Fri, 31 May 2002 10:31:37 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (93 lines)
Since we have so many options, I thought I'd throw in another one,
something I picked from the experts at Beechglen. Depends on your needs,
and why you want to know if a job is running or not running. Here's is
an example of "Is it running, because I don't want it running"

If you don't care what the job number is, only that the program, say as
an example INETD.NET.SYS is running, or not running.

The KEY to this is in the file equation "EXE" accessing a program file
with execute access on.

USER DEFINED COMMAND FILE:  STOPINET.UTIL.SYS

   SETVAR INETDRUNNING,"Y"
   SETVAR NUMTRIES,0
   WHILE INETDRUNNING = "Y"
      FILE TESTIT=INETD.NET.SYS;EXC
      SETVAR HPFSERR,0
      CONTINUE
      PRINT *TESTIT;END=1 >$NULL
      IF HPFSERR = 90 OR HPFSERR = 91 THEN
         SETVAR NUMTRIES,NUMTRIES + 1
         IF NUMTRIES = 1 THEN
            TELLOP INETd Server is still running,
            TELLOP Wait for shutdown.
            RUN INETD.NET.SYS;INFO="-k"
         ENDIF
         PAUSE 10
      ELSE
         SETVAR INETDRUNNING,"N"
      ENDIF
   ENDWHILE
   TELLOP INETd Server shutdown is complete.



--
Michael Anderson
Spring Independent School District
16717 Ella Boulevard
Houston, Texas 77090-4299
office: 281.586.1105
fax: 281.586.1187
-

>>> "Porter, Allen" <[log in to unmask]> 05/31/02 08:33AM >>>
If you know the job number, you could use a JINFO function:
setvar IsRunning jinfo('#J4',"EXIST")

You can also do something like this (at least it works for me!):
showjob job=myjob,manager.sys >showtemp
setvar numlines finfo('showtemp',19)
if !numlines<4 then
   #Job does not exist
else
   #Job exists
endif

-----Original Message-----
From: Tom of Bunyon [mailto:[log in to unmask]]
Sent: Thursday, May 30, 2002 11:32 PM
To: [log in to unmask]
Subject: Re: [HP3000-L] Need Intrinsic to say if a job is running or not


I think there's an MPEX command that returns the number of jobs matching
the
Job Card mask.

    %IF JSCOUNT("@,@.OMSINSTL")<>0 THEN
    %ENDIF


"Nancy Tietz" <[log in to unmask]> wrote in message
news:ad5uln011vv@enews1.newsguy.com...
> Anybody know of an Intrinsic that could be called to determine if a
> particular job is running or not?
> Other suggestions for similar functionality are welcome.
> Thanks
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2