Greg,
By now you have myriads of solutions available to you, but thought I might
add one more. We to did not have a scheduler nor MPEX and when confronted
with the challenge of restoring a production database onto a development
server and trying not to run into the nightly database backup on the
development server, I came up with this solution.
Production server launches database backup via scheduled job- Dbackupj.
When complete, it ftps over to development server the store to disc file it
created
and does a "site stream" of Drestorj on development while potentially the
Dbackupj is executing on development as well.
!job drestorj,manager.sys;outclass=lp,1
!
!comment JCL Version 1.7
!comment ************************************************************
!comment ** This JCL will be used to restore the ABLE account from **
!comment ** com4h001's DBACKUPJ JCL to the ABLEIT account. This JCL**
!comment ** streamed by the successful completion of com4h001's **
!comment ** DBACKUPJ.JOBS.SYS **
!comment ************************************************************
!
!tellop;
!tellop; ***********************************
!tellop; ** Wait For DBACKUPJ To Complete **
!tellop; ***********************************
!tellop;
!
!setvar JCHECKCNT 1
!
!while JCHECKCNT > 0
!
! checkjob "dbackupj,manager.sys"
! pause 15
!
!endwhile
!
Here is the content of checkjob
parm jobname="HELP" state="EXEC"
setvar d1 ""
setvar d0 ""
setvar d2 ":"
setvar d3 "a"
setvar d4 "s"
setvar d5 ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
setvar d6 "Q"
setvar d7 "W"
setvar d8 ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
setvar d9 "r"
setvar d10 "t"
setvar d11 "."
setvar d12 "G"
setvar d13 "f"
setvar cfv "A.04.00"
setvar cfa "Reid E. Baxter"
setvar cfn "Checkjob"
setvar cfd "Job Executing Utility"
setvar cfl "!hpfile"
setvar d14 '!d1!d11!d0 !cfn Found'
setvar d15 '!d1!d11!d0'
setvar d16 '!d1!d11!d0 !cfn Found No Matching Jobs (!jobname) Executing'
setvar d17 " "
setvar d18 ""
setvar d19 ""
setvar d20 '!d1!d9!d8!d8!d10!d0'
setvar d21 '!d1!d11!d0 Invalid Syntax Used - '
setvar d22 '!d1!d13!d8!d8!d12!d0'
setvar d23 '- !jobname!d17!d17!d17!d17!d17!d1!d11!d0'
echo !d1!d6!d5!d5!d7
echo !d1!d2!d0 Version: !cfv -!cfn- Written By: !cfa
!d1!d2!
d0
echo !d1!d3!d5!d5!d4
echo Date: !hpdatef Time: !hptimef
if ups("!jobname")="HELP" then
echo
echo Command file will check jobs/sessions specified using 'showjob'
syntax
echo (i.e. CHECKKJOB @.FATEST). If run from a job using same
'user.account',
echo executing job will NOT be checked. Wildcard account names are not
echo permitted. State parameter can be specified in command line.
Defualts
echo to !state. Number of checked jobs indicated in variable JCHECKCNT.
echo
deletevar d#,d##,check@,i#,cf? >$null
return
endif
purge check#.!hpgroup.!hpaccount;noconfirm >$null
purge check#.!hpgroup.!hpaccount,temp;noconfirm >$null
setvar jcheckcnt 0
setvar hpcierr 0
setvar hpresult 0
setvar checkloop true
file check0;rec=-80,,f,ascii;save;msg
file check1;rec=-80,,f,ascii
continue
showjob job=!jobname;!state >*check0
if hpcierr <> 0 then
setvar i0 0
setvar i1 0
while i0+i1 <92 do
setvar d21 ('!d21!d17')
setvar i1 len('!d23')
setvar i0 len('!d21')
endwhile
setvar d25 ('!d21!d23')
echo !d20
echo !d25
echo !d22
deletevar d#,d##,check@,i#,cf? >$null
return
endif
while checkloop
input checkrcd <check0
if str("!checkrcd",1,8)=" NO SUCH" then
setvar checkloop false
endif
if str("!checkrcd",1,8)="JOBFENCE" then
setvar checkloop false
endif
setvar i2 len(rtrim(str("!checkrcd",1,8)))
if (str("!checkrcd",1,2)="#J" or str("!checkrcd",1,2)="#S")and
str("!checkrcd"
,1,!i2) <> ("#!hpjobtype!hpjobnum")
setvar checkrec str("!checkrcd",1,8)
setvar jcheckcnt (!jcheckcnt + 1)
endif
endwhile
if jcheckcnt > 0 then
setvar d24 '(!jcheckcnt) Jobs!d17 with Supplied Parm (!jobname) !d15'
setvar i0 0
setvar i1 0
while i0+i1 <92 do
setvar d14 ('!d14!d17')
setvar i1 len('!d14')
setvar i0 len('!d24')
endwhile
setvar d14 ('!d14!d24')
echo !d20
echo !d14
echo !d22
else
setvar i0 0
setvar i1 0
while i0+i1 <92 do
setvar d16 ('!d16!d17')
setvar i1 len('!d16')
setvar i0 len('!d15')
endwhile
setvar d16 ('!d16!d15')
echo !d20
echo !d16
echo !d22
endif
deletevar d#,d##,check@,i#,cf? >$null
This command file is ingratiated with a lot of alternate line drawing and
length assessment and augmentation of strings but essentially continues to
'look' for either a particular job name or wilcarded user . The significant
difference that this command file has over the "pause job=" command has is
that pause will not delineate between scheduled, wait or executing states
of the supplied job name. So, if in my example Dbackupj is in a scheduled
state and I were to use the pause command, Drestorj would never complete
(dbackupj restreams itself, so in one state or another, it is always
'visable' to pause). HTH.
PS Variables d1 and d2 in checkjob are escape sequences for turning on and
off alternate line drawing (ie. "escape )B ctrl n" and "escape)B ctrl o"
respectively).
Regards,
Reid E. Baxter
Greg Stigers
<gregstigers@spam To: [log in to unmask]
cop.net> cc: (bcc: Reid E Baxter/OH/ONE)
Sent by: HP-3000 Subject: [HP3000-L] separating sets of job streams
Systems
Discussion
<[log in to unmask]
TC.EDU>
04/22/2005 05:16
PM
Please respond to
Greg Stigers
We have a few jobs that stream other subordinate jobs, waiting for and
validating each job before streaming the next subordinate. Currently, we
rely on LIMIT and STREAM ;AT= to manage these jobstreaming jobs, streaming
the second such job five minutes after the first. Inevitably, the first job
will take more than five minutes, and the second job will begin streaming
its jobs, before the first is finished, with less than desirable results.
Remarkably, the larger design is not so ham-handed, such that simply
combining two such jobs is not an effective solution. Creating yet another
layer, an uber-stream to stream both jobstreaming jobs could work. The
objection to that is that it complicates this further than two levels, and
perhaps merely perpetuates a poor idea.
So, is there some clever solution that only requires MPE? We do not have
MPEX. We do not have a budget for solving this, and that does not mean that
we can spend as much as we want. I can only spend time, within reason. We
are evaluating MasterOp, and that may become our solution.
Greg Stigers
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|