View previous topic :: View next topic
|
Author |
Message |
krishnakanagal
New User
Joined: 27 Feb 2009 Posts: 12 Location: Bangalore
|
|
|
|
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 |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
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 |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
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 |
|
|
AneeshMani
New User
Joined: 25 Jan 2008 Posts: 24 Location: india
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
|
AneeshMani
New User
Joined: 25 Jan 2008 Posts: 24 Location: india
|
|
|
|
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 |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
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 |
|
|
AneeshMani
New User
Joined: 25 Jan 2008 Posts: 24 Location: india
|
|
|
|
Hi Sambhaji,
Thanks for the reply. This is for adhoc purposes. Hence the job will have to be released by JCL |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
some scheduling tools do not allow multiple jobs within the same member.
Gerry |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
AneeshMani
New User
Joined: 25 Jan 2008 Posts: 24 Location: india
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Why do both jobs have to be in the same member? |
|
Back to top |
|
|
|