Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Run 2 JCLs using a single JOB
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Tue Apr 12, 2005 10:46 am    Post subject: Run 2 JCLs using a single JOB
Reply with quote

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
View user's profile Send private message

MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Tue Apr 12, 2005 12:08 pm    Post subject:
Reply with quote

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
View user's profile Send private message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Tue Apr 12, 2005 12:24 pm    Post subject:
Reply with quote

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
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Tue Apr 12, 2005 1:21 pm    Post subject:
Reply with quote

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
View user's profile Send private message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Tue Apr 12, 2005 1:51 pm    Post subject:
Reply with quote

... And wht about IEBEDIT, you have any idea how it works, juss for information.

Thanks
Back to top
View user's profile Send private message
sivatechdrive

Active User


Joined: 17 Oct 2004
Posts: 190
Location: hyderabad

PostPosted: Tue Apr 12, 2005 2:42 pm    Post subject: Re: Run 2 JCLs using a single JOB
Reply with quote

Hi andy

hope these may meet ur requirements

http://ibmmainframes.com/viewtopic.php?t=1234&highlight=

IEBEDIT for job
http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci970978,00.html

IEBEDIT for step
http://ibmmainframes.com/viewtopic.php?t=1886&highlight=iebedit
Back to top
View user's profile Send private message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Tue Apr 12, 2005 2:57 pm    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Apr 12, 2005 3:40 pm    Post subject: Re: Run 2 JCLs using a single JOB
Reply with quote

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
View user's profile Send private message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Tue Apr 12, 2005 3:57 pm    Post subject:
Reply with quote

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
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Tue Apr 12, 2005 6:31 pm    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Apr 13, 2005 12:55 am    Post subject: Re: Run 2 JCLs using a single JOB
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Apr 13, 2005 1:16 am    Post subject: Re: Run 2 JCLs using a single JOB
Reply with quote

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
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Wed Apr 13, 2005 3:42 pm    Post subject: Re: Run 2 JCLs using a single JOB
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Apr 13, 2005 3:53 pm    Post subject: Re: Run 2 JCLs using a single JOB
Reply with quote

MGIndaco wrote:
Are you in accord with me superk?

Yes, completely.
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Thu Apr 14, 2005 1:38 pm    Post subject:
Reply with quote

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
View user's profile Send private message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Mon Apr 18, 2005 9:45 pm    Post subject:
Reply with quote

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
View user's profile Send private message
die7nadal

Active User


Joined: 23 Mar 2005
Posts: 156

PostPosted: Tue Apr 19, 2005 12:29 am    Post subject:
Reply with quote

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
View user's profile Send private message
anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Tue Apr 19, 2005 12:41 am    Post subject:
Reply with quote

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
View user's profile Send private message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Tue Apr 19, 2005 7:32 pm    Post subject:
Reply with quote

Thanks for the comments guyz...
I appretiate your help.
Back to top
View user's profile Send private message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Sun Apr 24, 2005 11:14 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm
No new posts Combining contents of 2 files in to s... sprikitik SYNCSORT 1 Fri Jan 22, 2016 2:16 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us