View previous topic :: View next topic
|
Author |
Message |
andycool
New User
Joined: 12 Apr 2005 Posts: 63
|
|
|
|
Hi,
I want to know if the following is possible:
1. I have 3 JCLs with me namely: JCL1, JCL2 and JCL3.
2. When i run a batch, i have to submit all the three JCLs seperately. This consumes time.
3. I am planning to make a single JCL/job some'g like JCLM which will submit JCL1,2 and 3 one after another rlsing me from submitting 3 seperate JCLs every time.
4. My query is whether this is possible. I have heard about IEBEDIT but dunno exactly how it works.
Can anyone plz let me know as i am not-so-old in MainFrams. Thanks in advance to everyone |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
To submit 3 jcl in order you can call it with the same name and submit their from a single jcl thus you will have a queued. In most cases the order of job is not the same you desire(in this case 1,2,3) because the priority is granted by the init and the time you spend to initialize and convert your jcl!
In my opinion, you can also submit your jcls using the IKJEFT01 to submit the jcl in this way:
//SUBMIT EXEC PGM=IKJEFT01,PARM='',DYNAMNBR=50,
// REGION=4096K
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
PROF PREFIX(USERID)
SUBMIT 'LIB(JOB1)'
SUBMIT 'LIB(JOB2)'
SUBMIT 'LIB(JOB3)' |
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 63
|
|
|
|
Hey MGIndaco,
Thanks man for a preety quick reply. I really appreciate that. Can you jus give me a brief idea about the pgm that you have mentioned IKJEFT01..i mean wht exactly does it do..
As you have shown interest in this, i'll basically tell you what i want to achieve:
1. We have a batch that runs for almost 3-4 hours daily.
2. This batch has a cycle of 12 jobs which are manually started one after another. For some reason they are not scheduled and are manally taken care of.
3. Every time the operator has to take care whether the previous job is completed so that he can start with the next one.
4. My idea is to CLUB all these 12 jobs in a single one and juss run that single job.
5. This will not only save time but also keep the operator from contineously monitoring it. Only if some job among the 12 abends somewhere, the operator 'll have to look out for.
6. Wht you think about this.
Thanks again |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
Ok, but if your are looking for a manual scheduler that granted the dependency you can also, in alternative, add at the and of each jcl the program IKJEFT01 and submit next job!
The IKJEFT01 is simply a IBM program that allow you to execute command, rexx and other kind of system utility of tso environment.
Try this solution in your phases. |
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 63
|
|
|
|
... And wht about IEBEDIT, you have any idea how it works, juss for information.
Thanks |
|
Back to top |
|
|
sivatechdrive
Active User
Joined: 17 Oct 2004 Posts: 191 Location: hyderabad
|
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 63
|
|
|
|
Hey Siva,
Thanks for the inputs. They are really helpful.
One doubt is, the input to the IEBEDIT is a "sequential data set containing my job".
So if my JCL1, JCL2 and JCL3 are in my PDS 'FOLDER.JCL(JCL1)'
'FOLDER.JCL(JCL2)' and
'FOLDER.JCL(JCL3)'
then will the code be like :
___________________________________________________
//STEPSUB EXEC PGM=IEBEDIT,COND=0,NE,DOWNLOAD) //SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DDNAME=IEFRDER
//IEFRDER DD DSN=FOLDER.JCL(JCL1),DISP=OLD,DELETE,DELETE)
//SYSUT2 DD SYSOUT=(9,INTRDR),
// DCB=(RECFM=FB,LRECL=80)
//*
____________________________________________________
Where m i goin to put the FOLDER.JCL(JCL2) and FOLDER.JCL(JCL3) ?
Thanks Again |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
andycool, IEBEDIT is of no value for your situation, so I would not bother with it.
You know, you could just create a new member that contains all three jobs, and just submit that entire member. |
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 63
|
|
|
|
Hey SuperK,
Thats what i also want to do, considering the data given below can you plz provide me the piece of code.
My JCLs are in FOLDER.JCL(JCL1)
FOLDER.JCL(JCL2) and FOLDER.JCL(JCL3) respectively.
The job i want these three JCLs to be included is FOLDER.JCL(JCLM).
_______Structure________
JCLM
START
--JCL1
--JCL2
--JCL3
END
_______________________
MGIndaco has given me the solution for using pgm=IKJEFT01 as mentioned above in the thread. What are your views on this.
Please provide me the piece of code if you can.
Thanks Again for replying. |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
sivatechdrive, I think that submit via internal reader is allowed for system admin only! In every solution of mainframe I've found this kind of work is outlaw and locked by installation exit.
But I can make a mistake! |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
This should work just fine as a single member of the JCL library:
Code: |
//JOB1 JOB (...),'SUPERK',CLASS=T,MSGCLASS=T,
// MSGLEVEL=(1,1),NOTIFY=&SYSUID
//*
//STEP0001 EXEC PGM=IEFBR14
//*
//JOB2 JOB (...),'SUPERK',CLASS=T,MSGCLASS=T,
// MSGLEVEL=(1,1),NOTIFY=&SYSUID
//*
//STEP0001 EXEC PGM=IEFBR14
//*
//JOB3 JOB (...),'SUPERK',CLASS=T,MSGCLASS=T,
// MSGLEVEL=(1,1),NOTIFY=&SYSUID
//*
//STEP0001 EXEC PGM=IEFBR14
//*
|
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
For what it's worth, I find the solution provided by MGIndaco to be a very creative alternative that should work well in most environments. I like the fact that using the TSO SUBMIT command doesn't allow the user to bypass any implemented JES submit exits.
Concerning the use of the Internal Reader, I tend to support using it only for limited purposes (such as performing system tasks or talking to the job scheduling system or scheduling print output). However, using the Internal Reader is usually, in my experience, not restricted, on at least the test and development systems. I have seen it restricted by RACF userid and/or JES exits on production systems. |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
I remember you that submit 3 jcl within a member does not granted a linear execution as you see in superk's sample(1->2->3)!
The job that will start first is the lowest complicated, in number of execute statement and other parms, for the initiator!
Are you in accord with me superk?
Regards,
MGIndaco |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
MGIndaco wrote: |
Are you in accord with me superk?
|
Yes, completely. |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
This is my solution:
If you have 3 job, then 3 members(all with their jobcard), insert at the end of the first job this step:
//JOB1 JOB ........
.....
.....
//SUBMIT2 EXEC PGM=IKJEFT01,PARM='',DYNAMNBR=50,
// REGION=4096K,COND=.......
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
PROF PREFIX(USERID)
SUBMIT 'LIB(JOB2)'
that will submit the second(JOB2) and if you want to test previous steps use the condition(COND=).
The same thing must be done in the sencond job and the other.
At the end of your modification then submit the first job and your chain will be submitted automatically when each job ended.
If you want to test it try with member that contain only a IEFBR14 and look times and result. |
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 63
|
|
|
|
Hey MGIndalco,
The step SUBMIT2..shud that be given after the JOB TERMINATION step or b4 that?
I mean shud this be the last step in the JCL?
Plz acknowledge.
Regards, |
|
Back to top |
|
|
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 156
|
|
|
|
andycool wrote: |
Hey MGIndalco,
The step SUBMIT2..shud that be given after the JOB TERMINATION step or b4 that?
I mean shud this be the last step in the JCL?
Plz acknowledge.
Regards, |
Yes, the Submit STEP should be the last step of every Job. |
|
Back to top |
|
|
anuradha
Active User
Joined: 06 Jan 2004 Posts: 247 Location: Hyderabad
|
|
|
|
Hi Andycool,
SUBMIT2 step should be the last step of job1. So once the steps of job1 are finished JOB1 will execute the SUBMIT2 step which will submit the second job.
If the jobs are interrelated then we should give cond parameter too. |
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 63
|
|
|
|
Thanks for the comments guyz...
I appretiate your help. |
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 63
|
|
|
|
Hi Guys,
As per your above comments the SUBMIT2 step will be the last step. As i am chaining here a series of jobs, it will be necessary for me to keep a track of Return Codes. For instance:
===========================================
Job1step1
Job1step2
Job1step3
Job1SUBMIT2 //this will submit the job JOB2
Job2step1
Job2step2
Job2step3
Job2SUBMIT3 //this will submit the job JOB3
==========================================
As illustrated above if i want to chk a condition that :
If the RC of Job1 = 0 then only proceed with the step Job1SUBMIT2...how can i do this?
As i am chaining a series of jobs, this check will be required to ensure that the previous job has finished successfully and the next job in the series can be submitted.
Regards, |
|
Back to top |
|
|
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 156
|
|
|
|
andycool wrote: |
Hi Guys,
As per your above comments the SUBMIT2 step will be the last step. As i am chaining here a series of jobs, it will be necessary for me to keep a track of Return Codes. For instance:
===========================================
Job1step1
Job1step2
Job1step3
Job1SUBMIT2 //this will submit the job JOB2
Job2step1
Job2step2
Job2step3
Job2SUBMIT3 //this will submit the job JOB3
==========================================
As illustrated above if i want to chk a condition that :
If the RC of Job1 = 0 then only proceed with the step Job1SUBMIT2...how can i do this?
As i am chaining a series of jobs, this check will be required to ensure that the previous job has finished successfully and the next job in the series can be submitted.
Regards, |
U can either use an IF statement like below,
IF Job1step3.RC=0 THEN
Job1SUBMIT2
ENDIF
Or
Job1SUBMIT2 EXEC PGM,PARM=(0,LT) |
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 63
|
|
|
|
Hey die7 thanks for that.
Please tell me if the below psuedo code is valid or not:
======================
Job1step1
Job1step2
IF Job1step2.RC <> 0 THEN // I want to continue execution of
// Job1tep3 even though Job1Step2
// is not properly executed.
Job1step3
ENDIF
Job1step3
IF Job1step3.RC = 0 THEN
Job1SUBMIT2
ENDIF
Job1SUBMIT2 //this will submit the job JOB2
Job2step1
Job2step2
Job2step3
Job2SUBMIT3 //this will submit the job JOB3
===========================================
Bottomline: To continue the job even though Job1Step2 is not properly executed. That is not to abend the job at any point of time. |
|
Back to top |
|
|
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 156
|
|
|
|
andycool wrote: |
If the RC of Job1 = 0 then only proceed with the step Job1SUBMIT2...how can i do this?
|
Since u said u want to check it for 0 and only then proceed I coded it, taht way.
If u want to execute the STEP even though if it has some CC Greater than or Equal to Zero , the easiest way wud be to give COND=(0,GT). |
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 63
|
|
|
|
Hi Guys,
I have tried here to structure a job, considering all your inputs especially those from MGIndalco and Die7 in the thread. This is just the first job in the chain. It'll look like this:
==========================================
//Job1 JOB ...
//
//Job1step1
//
//Job1step2
//
//Job1step3
//
//JOB1SUBMIT2 EXEC PGM=IKJEFT01,
// COND=(0,GT),
// PARM='',DYNAMNBR=50,
// REGION=4096K
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
PROF PREFIX(ANDYCOOL)
SUBMIT 'ANDYCOOL.TEST.JOBS(JOB2)'
==========================================
This will submit the Job2.
The COND=(0,GT) will submit the JOB2 even though the prevoius job maxcc is not zero.
Please let me know if i am missing any segments here.
Also let me know, in the "PROF PREFIX(USERID)"; is the userid is my TSOid ?
Thanks in Advance, |
|
Back to top |
|
|
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 156
|
|
|
|
Ya u shud be good to go, I hope u already know what u mean by the PROF command. It will prefix all unqualified Datasets with the prefix mentioned, that Id is ur TSO id. Make sure the Input files are all having the high level qualifier as ur TSO ID. |
|
Back to top |
|
|
|