IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Make a Job Executable through another job


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
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
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
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
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
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: 1702
Location: Australia

PostPosted: Thu Mar 18, 2010 1:24 pm
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
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
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
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: 1702
Location: Australia

PostPosted: Thu Mar 18, 2010 2:19 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Mar 18, 2010 2:20 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Mar 18, 2010 2:50 pm
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

Moderator Emeritus


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

PostPosted: Thu Mar 18, 2010 8:54 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts trying to make sense of keylists TSO/ISPF 11
No new posts Make cobol variable value a variable COBOL Programming 3
No new posts Single COPY CICS TS datasets and when... CICS 2
No new posts DFSORT VB File make 2 lines from 1 DFSORT/ICETOOL 2
No new posts How to make REXX process different GDGs? CLIST & REXX 15
Search our Forums:

Back to Top