HP3000-L Archives

May 2006, Week 2

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:
"Pickering, John (NORBORD)" <[log in to unmask]>
Reply To:
Pickering, John (NORBORD)
Date:
Wed, 10 May 2006 14:53:51 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (80 lines)
How about turning the whole solution around?

Get a list from showjob of all the executing jobs. Go through the list
looking for a job signed on the same way as yourself, being sure to skip
yourself.

Something like:

!file sjlist,oldtemp
!if finfo('*sjlist','exists') then
!   purge sjlist,temp
!endif
!file sjlist;temp;msg;rec=-72,1,f,ascii
!showjob job=@j;exec>*sjlist
!while finfo("sjlist","eof") <> 0
!  input sjline < sjlist
!  setvar sjword word(sjline)
!  if lft(sjword,1) = '#' then
!     if "!sjword" <> "#!hpjobtype!hpjobnum" then
!        setvar _jobuseracct jinfo("!sjword","jobuseraccount")
!        if "!_jobuseracct" = "!hpjobname,!hpuser.!hpaccount" then
!           tell manager.!hpaccount Found a duplicate job!
!        endif
!     endif
!  endif
!endwhile

Regards,
JWP

-----------------

HP-3000 Systems Discussion <[log in to unmask]> wrote on 05/10/2006 
03:31:49 AM:

> We have loads of jobs that would cause damage if more than one copy was
> run. To prevent this we have the following code at the start of them:
> 
>   !if jobcnt('jobname,user.account') > 1 then
>   !  tellop WARNING: Job is already running. I'm terminating.
>   !  eoj
>   !  endif 
> 
> A couple of system problems has resulted in a large backlog of jobs
> waiting to run. One of our jobs is never getting passed the above check
> because by the time it moves from WAIT to EXEC our scheduler has
> streamed the next copy which joins the WAIT queue.
> 
> One way I can see around this is to do the following instead (we have
> MPEX):
> 
>   !setjcw mpexfaststart 1
>   !mpex
>   %if jscount('jobname,user.account&EXEC') > 1 then
>   %  tellop WARNING: Job is already running. I'm terminating.
>   %  eoj
>   %  endif 
>   %exit
>   !setjcw mpexfaststart 0
> 
> Anybody have a method that would work with vanilla MPE (our D/R box does
> not have MPEX)?
> 
> 
> regards, 
> 
> Robert W.Mills 
> MIS Systems Development Manager 
> Windsong Services 
> +44 (0)20 8309 3604 
> 
> * 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