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
 

 

Make a Job Executable through another job

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
krishnakanagal

New User


Joined: 27 Feb 2009
Posts: 12
Location: Bangalore

PostPosted: Thu Mar 18, 2010 6:08 am    Post subject: Make a Job Executable through another job
Reply with quote

Hi,

I need to make a Job A scheduled in CA7 as a daily job executable only when job B runs. Can some one help me?

Job B is triggered by a dataset & Job A which can run only over night has be be executable when Job B has run. after Job A has run it should become non executable

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

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Mar 18, 2010 10:46 am    Post subject:
Reply with quote

Quote:
Job B is triggered by a dataset & Job A which can run only over night has be be executable when Job B has run. after Job A has run it should become non executable

Why do you want to make job A executable\non executable based on B?

How job A is triggered?

I am confused.
Do you want JOB A to be triggered by JOB B or
you want JOB A to be to become executable if B runs successfully and at the end of A again to make A non exec. But I dont see purpose behind doing this??
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Mar 18, 2010 11:25 am    Post subject:
Reply with quote

Anyways,
below is sample jobstep to make your job non executable.
Code:

//U7BATCH EXEC PGM=SASSBSTR,PARM=5               
//UCC7CMDS DD DSN=SYS3.UCC7.COMMDS,DISP=SHR       
//BATCHIN  DD DSN=SYS3.UCC7.BATCH5I,DISP=SHR     
//BATCHOUT DD DSN=SYS3.UCC7.BATCH5O,DISP=SHR     
//SYSPRINT DD SYSOUT=R                           
//SYSDUMP  DD SYSOUT=A                           
//SYSIN    DD DATA,DLM=##                         
JOB                           
UPD,yourjobname,EXEC=N,JCLID=XXX 
##

Similarly to make it executable again use
//SYSIN DD DATA,DLM=##
JOB
UPD,yourjobname,EXEC=Y,JCLID=XXX
##
Back to top
View user's profile Send private message
AneeshMani

New User


Joined: 25 Jan 2008
Posts: 24
Location: india

PostPosted: Thu Mar 18, 2010 1:14 pm    Post subject: Job Release from another job
Reply with quote

Hi.. Mine is a similar requirement with JES2. I have 2 jobs job A and Job B. I have put TYPRUN=HOLD on job B so that job B will not execute before the job A. Can anyone please suggest a way to release job B only after the execution of job A

Thanks in advance..
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Mar 18, 2010 1:24 pm    Post subject:
Reply with quote

Hi,

why not add a last step to job A to submit Job B.

Don't forget to remove TYPRUN=HOLD.


Gerry
Back to top
View user's profile Send private message
AneeshMani

New User


Joined: 25 Jan 2008
Posts: 24
Location: india

PostPosted: Thu Mar 18, 2010 2:07 pm    Post subject:
Reply with quote

Hi..
thanks for the reply... both my jobs are in the same member. if i submit, both the jobs will get submitted.So is it necessary for me to remove the TYPRUN=HOLD. I tried RELEASE utility,( PARM='A JOBB' ) it does not work in my shop. Also i tried giving 'A' against the job in the spool. It has got authorisation issues. The only way is to release the job thru JCL
Can you suggest any utility thru which i can do this?
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Mar 18, 2010 2:08 pm    Post subject: Re: Job Release from another job
Reply with quote

AneeshMani wrote:
Hi.. Mine is a similar requirement with JES2. I have 2 jobs job A and Job B. I have put TYPRUN=HOLD on job B so that job B will not execute before the job A. Can anyone please suggest a way to release job B only after the execution of job A

Thanks in advance..

Why dont you speak to your scheduling team to take care by schedular used at your shop.
Back to top
View user's profile Send private message
AneeshMani

New User


Joined: 25 Jan 2008
Posts: 24
Location: india

PostPosted: Thu Mar 18, 2010 2:10 pm    Post subject:
Reply with quote

Hi Sambhaji,

Thanks for the reply. This is for adhoc purposes. Hence the job will have to be released by JCL
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Mar 18, 2010 2:19 pm    Post subject:
Reply with quote

Hi,

some scheduling tools do not allow multiple jobs within the same member.


Gerry
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Thu Mar 18, 2010 2:20 pm    Post subject: Reply to: Make a Job Executable through another job
Reply with quote

Quote:
both my jobs are in the same member.


You can still have the two things in the same member
( just put them in the right place )

Code:
//JOBONE   JOB ...
//J1S1    EXEC ...
//        ...  STEP1 RELATED STUFF
//*
...
...
...
//J1Sn    EXEC ...
//        ...  STEPn RELATED STUFF
//*
//LAST    EXEC PGM=IEBGENER
//SYSPRINT  DD SYSOUT=Z
//SYSIN     DD DUMMY
//SYSUT1    DD DATA,DCB=LRECL=80,
//             DLM=AA
//JOBTWO   JOB ...
//J2S1    EXEC ...
//        ...  STEP1 RELATED STUFF
//*
...
...
...
//J2Sn    EXEC ...
//        ...  STEPn RELATED STUFF
//*
AA
//SYSUT2    DD SYSOUT=B,DISP=(INTRDR)
//
Back to top
View user's profile Send private message
AneeshMani

New User


Joined: 25 Jan 2008
Posts: 24
Location: india

PostPosted: Thu Mar 18, 2010 2:42 pm    Post subject:
Reply with quote

Hi Enrico,

The Internal Reader works fine but is there any other way or any other utility of executing my second job after my first job .
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Thu Mar 18, 2010 2:50 pm    Post subject: Reply to: Make a Job Executable through another job
Reply with quote

Quote:
The Internal Reader works fine but is there any other way or any other utility of executing my second job after my first job .

NO! given the requirements

pure speculation on other approaches could be ...
a scheduler ...
does not satisfy the requirement of two jobs in the same menber
the DJC facility , ( //*NET contol cards )
but then Your shop would have to convert to JES3
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 18, 2010 8:54 pm    Post subject:
Reply with quote

Hello,

Why do both jobs have to be in the same member?
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts DFSORT VB File make 2 lines from 1 BridgetBrackenbury DFSORT/ICETOOL 2 Fri Feb 12, 2016 3:48 am
No new posts How to make REXX process different GDGs? venksiv CLIST & REXX 15 Thu Sep 24, 2015 5:35 pm
No new posts Natural online, make a password invis... nitj Java & MQSeries 1 Tue Dec 09, 2014 4:54 pm
No new posts Count the number of JCL executable steps nartcr JCL & VSAM 5 Wed Nov 05, 2014 2:57 am


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