View previous topic :: View next topic
|
Author |
Message |
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Could it be possible to start the job execution from a particular step using COND parameter (should not use restart)?
My answer was NOT POSSIBLE. Please let me know, if Im correct or made a mistake.
Thanks all for your inputs in advance. |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
Murmokh,
In the job card give the steps not to be executed as COND=ONLY.
For example ,if the job has 3 steps R1,R2,R3.Let's assume you want to execute the 3rd step alone and skip the first two steps.
Then code it as COND.R1=ONLY,COND.R2=ONLY
where R1 and R2 are step names.
By doing this you skip the first two steps and execution will be for R3 only.
Hope you are clear.... |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Muthu,
I had tried executing a job with 3 steps (all are iefbr14 steps). Got the JCL error. Pasted the spool message (JESJCLIN)
below for your reference -
Code: |
//CONDDDD JOB (TEST),'PD2ZD',NOTIFY=&SYSUID,TIME=(,5),
// COND.STEP1=ONLY,COND.STEP3=ONLY
************** NON-VALID JOB STMT - KEYWORD LENGTH NOT VALID ******
//* $ACFJ219 ACF2 ACTIVE MVSD
//*
//*
//STEP1 EXEC PGM=IEFBR14
//IN1 DD DSN=&&SYSUID..MURALI.UTILS1,DISP=(MOD,DELETE,DELETE),
// SPACE=(TRK,0)
//*
//STEP2 EXEC PGM=IEFBR14
//IN2 DD DSN=&&SYSUID..MURALI.UTILS2,DISP=(MOD,DELETE,DELETE),
// SPACE=(TRK,0)
//*
//STEP3 EXEC PGM=IEFBR14
//IN3 DD DSN=&&SYSUID..MURALI.UTILS3,DISP=(MOD,DELETE,DELETE),
// SPACE=(TRK,0)
$HASP106 JOB DELETED BY JES2 OR CANCELLED BY OPERATOR BEFORE EXECUTION
------ JES2 JOB STATISTICS ------
17 CARDS READ
7 SYSOUT PRINT RECORDS
0 SYSOUT PUNCH RECORDS
0 SYSOUT SPOOL KBYTES
0.00 MINUTES EXECUTION TIME
|
My intention was to execute step2 alone. I assume the JCL error is because of COND condition given in the job statement.
Could be please share few more inputs in this regard. |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
I have done it for cataloged procedures.I am testing for instream procedure.
Any way myguess, don't code it in job statement.
Code it seperately between jobcard and step1. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Muthu,
Quote: |
Code it seperately between jobcard and step1. |
Could you provide an example for this? |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
Hi here's the answer,
COND=ONLY should be given in the particular step which you don't want to execute.
For example,If Step 1 is to be bypassed
Code: |
STEP1 EXEC PGM=IEFBR14,COND=ONLY |
for step2 it is
Code: |
STEP2 EXEC PGM=IEFBR14,COND=ONLY |
This will help you... |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Thanks Muthu. It worked fine. |
|
Back to top |
|
|
JayC
New User
Joined: 27 Sep 2008 Posts: 70
|
|
|
|
muthuvel wrote: |
Hi here's the answer,
COND=ONLY should be given in the particular step which you don't want to execute.
For example,If Step 1 is to be bypassed
Code: |
STEP1 EXEC PGM=IEFBR14,COND=ONLY |
for step2 it is
Code: |
STEP2 EXEC PGM=IEFBR14,COND=ONLY |
This will help you... |
Suppose I have 3 IEFBR14 steps in my JOb, Step1,2 and 3 and I want to run only STEP1 and STEP3, and if I code
STEP1 EXEC PGM=IEFBR14,COND=ONLY
.
.
.
STEP2 EXEC PGM=IEFBR14
.
.
STEP3 EXEC PGM=IEFBR14,COND=ONLY
STEP1 will definately run,because there are no previous return codes to check hence the first step runs. STEP2 will run of course, no issues. and then STEP3 when it checks the return code, suppose STEP2 has abended... then that would mean that STEP3 WILL ALSO RUN!!?
Correct me If I am wrong. |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
STEP1 will not run, even if it is first step when you use COND=ONLY. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
From the JCL Language Reference:
Quote: |
The system evaluates a COND parameter on the first EXEC statement in a job as false. However, you can use an IF statement before the first EXEC statement in a job to bypass the step. |
|
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
True Robert. But I concluded my statement after thorough testing only. |
|
Back to top |
|
|
JayC
New User
Joined: 27 Sep 2008 Posts: 70
|
|
|
|
Oops.. Sorry
What I meant to write was "STEP1 will DEFINATELY NOT RUN"....
Sorry for the typo. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
I do not understand why interviewers keep asking such a stupid question...
in any decently managed operations room, people are not allowed to
submit changed on the fly jobs....
the proper steps are...
1 setup
2 run
-- in case of malfunctions
-- recovery/reset
-- repeat step 2
3 post process
the production jobs should never be changed or run partially |
|
Back to top |
|
|
|