View previous topic :: View next topic
|
Author |
Message |
Patrick Bacelar
New User
Joined: 05 Sep 2022 Posts: 15 Location: Brazil
|
|
|
|
We are having problems with the scheduler and until the problem is solved, we need to manually schedule several jobs and all of them need to change the MSGCLASS parameter from D to H and add the USER=XXXX.
Also, the jobs need to run in sequence.
Is it possible to do that?
Thanks in advance. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 735 Location: Denmark
|
|
|
|
Yow will need some program to modify the jobs. Are there a lot? Making them into ISPF skeletons might be a solution.
To have them run in sequence you can do
1. Submit job2 and onwards with TYPRUN=HOLD and add a step at the end of each job to issue a release command for the next in line.
2. JES2 job groups, see JES2 Execution Control Statements in the JCL reference manual (my recommendation). |
|
Back to top |
|
|
pepeo_2k3
New User
Joined: 04 Nov 2023 Posts: 6 Location: Azerbayjan
|
|
|
|
By writing a REXX code, you can generate a mass of jobs with the same ID to serialize them to be run in sequence and set the desired values to your parameters as well .... |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 735 Location: Denmark
|
|
|
|
"with the same ID to serialize them to be run in sequence"
Not neccessarily true, JES2 now allows for duplicate jobnames. and execution sequence is not guaranteed to be in submission sequence. |
|
Back to top |
|
|
pepeo_2k3
New User
Joined: 04 Nov 2023 Posts: 6 Location: Azerbayjan
|
|
|
|
Quote: |
Not neccessarily true, JES2 now allows for duplicate jobnames |
You mean either using
in JES2 parameters, it doesn't work? Since this parameter is in the JES2 level this may not be the choice. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 735 Location: Denmark
|
|
|
|
Yes that works, but if you submit a bunch of jobs with the same jobname I would not rely on them being started in jobid sequence. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
Yes that works, but if you submit a bunch of jobs with the same jobname I would not rely on them being started in jobid sequence. |
even submitting jobs with different names does not guarantee the execution sequence
( see the jes2 manuals for the number of converter tasks ) |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
Perhaps a serial batch initiator (unique job class) exists in your system. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 735 Location: Denmark
|
|
|
|
I can only, once more, recommend JES2 job groups. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
Perhaps a serial batch initiator (unique job class) exists in your system. |
nope ...
with multiple converters the sequence of execution depends ON THE COMPLEXITY
of the job
a one step job will be converted be ready for execution much faster than a multi step complicated job |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Maybe add a step at the end of each job to submit the next job in the sequence. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 735 Location: Denmark
|
|
|
|
Pedros idea might be the simplest solution. For my suggestion 'Submit job2 and onwards with TYPRUN=HOLD and add a step at the end of each job to issue a release command for the next in line.' you can use REXX/SDSF to issue the release command:
Code: |
/* REXX */
cc=isfcalls('ON')
arg isfprefix . /* parameter = jobname */
isfowner ='*'
isffiltermode = 'AND'
isffilter = 'STATUS EQ HOLD'
Address SDSF "ISFEXEC ST"
if jname.0 =0 then do
say 'Job' isfprefix 'not found in hold q'
exit 8
end
say left(jname.1,8) left(jobid.1,8) left(queue.1,10) status.1
say '$AJ' jobid.1
Address SDSF "ISFSLASH'$AJ" substr(jobid.1,4) "'"
exit 0
|
The RELEASE command can be protected in a way which does not open all console commands for the job. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 735 Location: Denmark
|
|
|
|
Just realized, the
Address SDSF "ISFSLASH'$AJ" substr(jobid.1,4) "'"
should really be
Address SDSF "ISFSLASH'$A"jobid.1"'"
as your jobid might not be in the form JOBxxxxx. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
One of my patents was for a simple scheduler job. A rexx program that read a control file and submitted a list of jobs. It checked the jobs via SDSF rexx API and waited for each job to end with good return code before submitting the next job.
It worked well, but it takes two initiators.
update: actually, I wrote this before the existence of the SDSF rexx API. I used the SDSF batch interface and had so many problems that I was able to convince my colleagues at IBM to create the SDSF rexx API. |
|
Back to top |
|
|
Patrick Bacelar
New User
Joined: 05 Sep 2022 Posts: 15 Location: Brazil
|
|
|
|
Thank you for the suggestions. Unfortunately, due to the limited time we had, everything was done manually. However, the information you provided will be useful in my studies. This will help me be better prepared for when this situation arises again. I am also enhancing my knowledge in REXX. |
|
Back to top |
|
|
|