HP3000-L Archives

October 2000, 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:
"Genute, A Thomas" <[log in to unmask]>
Reply To:
Genute, A Thomas
Date:
Fri, 20 Oct 2000 13:09:17 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (55 lines)
Very nice!   I tend to prefer OS solutions, if available,  to third party
solutions.   But, not being a UNIX/POSIX guy, I don't know exactly how your
script works.   Specifically the awk syntax.   With a little bit of effort,
this can also be done with an MPE script.


Thanks,
Tom Genute
Phone:  (973) 716-8150
Pager:  (877) 485-7334

                -----Original Message-----
                From:   Mark Bixby [mailto:[log in to unmask]]
                Sent:   Friday, October 20, 2000 12:56 PM
                To:     Genute, A Thomas
                Cc:     [log in to unmask]
                Subject:        Re: %ABORTJOB in jobstream



                "Genute, A Thomas" wrote:
                >
                > I don't think this is the solution being sought.   This
will abort all JOBS,
                > not sessions in all accounts except sys.   The
-J#!hpjobnum will abort
                > everything except the currently executing job regardless
of account.   The
                > question was to abort all executing JOBS and SESSIONS "in
the same account"
                > as the job.  I left out the active, so the solution should
be:
                >
                > %ABORTJOB EXEC&@.!HPACCOUNT-#J!HPJOBNUM

                While MPEX is certainly a fine product, here's a POSIX
solution that anybody
                with just FOS can use:

                callci "showjob [log in to unmask];exec" |\
                  awk "/^#/ && ! /^#${HPJOBTYPE}${HPJOBNUM} / { print \$1 }"
|\
                  while read jobnum; do callci "abortjob $jobnum"; done

                We call :SHOWJOB to display all executing jobs in the same
account, then pipe
                the output into awk which matches all lines starting with #
but not our own job
                number.  Awk prints the matching job numbers and then pipes
that into the while
                statement which calls :ABORTJOB on each jobnum printed by
awk.

                - Mark B.j

ATOM RSS1 RSS2