Pass info about/from one batch job to another.
In this case one job creates the JCL for the other job, and includes the job number
of the creator in the created job.
You could include the HPSTREAMEDBY of the creator in the created job, or any other variable.
For example, here I want another job to run that will check the this job (#J1817) $stdlist.
So I pass the current jobnumber (#J1817) to the new job that I am creating, by echoing
the variable into the new job stream file.
First job #J1817, that creates another job stream file:
95 !# ***********************************************
96 !# ***** BUILD BATCH JOB, SUMMARY OF BACKUP STATUS
97 !PURGE BKSTATUS.SYSUTIL > $NULL
98 !BUILD BKSTATUS.SYSUTIL;REC=-80,1,F,ASCII;DISC=20
99 !FILE JCLFILE=BKSTATUS.SYSUTIL,OLD
100 !# -----------------------------------------------------------------
101 !ECHO #JOB BKSTATUS,MANAGER.SYS;OUTCLASS=LP;PRI=CS;HIPRI >> *JCLFILE
102 !ECHO #PAUSE JOB=#J!HPJOBNUM >> *JCLFILE
103 !ECHO #XEQ /SYS/UTIL/CHKBKUP !HPJOBNUM >> *JCLFILE
104 !ECHO #EOJ >> *JCLFILE
105 !# ----------------------------------------------------------------
106 !# ***********************************************
107 !
Created JCL File looks like this. It can be streamed at anytime, by any other job or session.
Notice the PAUSE will wait for J#1817 (this jobs creator, not the streamed by job) to log off first.
1 #JOB BKSTATUS,MANAGER.SYS;OUTCLASS=LP;PRI=CS;HIPRI
2 #PAUSE JOB=#J1817
3 #XEQ /SYS/UTIL/CHKBKUP 1817
4 #EOJ
--
Michael Anderson
Spring Independent School District
16717 Ella Boulevard
Houston, Texas 77090-4299
office: 281.586.1105
fax: 281.586.1187
-
>>> Robert Mills <[log in to unmask]> 05/24/01 06:21AM >>>
Hi everyone,
We have a command file, called jobtell, that uses MPEX's %WARNF command to
display a message over the function keys of the session who :STREAMed it
(extracts the session number from the HPSTREAMEDBY variable). It works and
the users love it. Hurrah!!!!!!!! I now have to get a job :STREAMed by
another job to send a message to the session that started it all (hope that
this makes sense to you). This means that I have to somehow pass the first
jobs HPSTREAMEDBY to all subsequent jobs.
Apart from getting the first job to build the second job (echo commands to a
temporary file) and then :STREAM it I can see no other solution at the
moment.
Any ideas?
regards,
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Robert W.Mills (Systems Development Manager) |
|Windsong Services, St. Mary Cray, ENGLAND |
|Tel : +44 (0)1689 870622 x3005 |
|Fax : +44 (0)1689 899026 |
|Email: [log in to unmask] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* 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 *
|