Subject: | |
From: | |
Reply To: | Tony B. Shepherd |
Date: | Thu, 8 Jun 1995 18:32:25 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
In article <[log in to unmask]>,
James Bennett <[log in to unmask]> wrote:
] Subject: Getting Job Number from Stream Command
] On MPE/iX, I need to get the job number issued by the STREAM
] command. Currently my only working theory is to run a separate
] process (CI or whatever), with the STREAM command in the INFO
] parm and redirect STDLIST to a file for later examination.
] While doable, this seems like too much effort (and overhead)
] for each job.
Dredged up from the darkness surrounding an unattended backup job:
COMMENT NOW STREAM THE BATCH JOBS. CAPTURE THE JOB NUMBERS
COMMENT ON THE WAY BY AND GIVE THEM A BOOST.
IF FINFO("JOBSOFFJ", 0)
CONTINUE
STREAM JOBSOFFJ <$NULL >*SHOWOUTS
ECHO BATCH SHUTDOWN JOBS STREAMED . . .
COMMENT MAKE SURE WE WILL HAVE AN OPEN SLOT TO USE
LIMIT ![HPJOBCOUNT + 1]
WHILE FINFO("*SHOWINS", 19) > 0 DO
INPUT _X <*SHOWINS
SETVAR _X LTRIM(RTRIM(_X)) + ";INPRI=14"
CONTINUE
ALTJOB !_X
PAUSE 30
ENDWHILE
ELSE
ECHO NO BATCH SHUTDOWN JOB ("JOBSOFFJ") FOUND - SKIPPED.
ENDIF
File equations SHOWOUTS and SHOWINS refer to the same TEMP file. JOBSOFFJ
is a stack of jobs to cause all continuous processes to shut down (in my
case, 6 or 7 individual jobs). The jobfence has been set to 13. This
(piece of a) command file runs at the console, and OP is :ALLOWed. Every
30 seconds another shutdown job is launched.
Quit giggling - it worked. Did it this way because more than one job
number needed to be captured. Hope it helps. Add water and stir.
--
Regards -- Tony B. Shepherd -- [log in to unmask]
This opinion is worth what you paid for it, and if it proves to be wrong,
all monies paid will be cheerfully refunded upon presentation of receipt.
|
|
|