IN MY JCL I VE 8 STEPS I WANT TO EXCUTE STEP 8 FIRST THEN
EXCUTE STEP 4 ,HOW WILL EXCUTE STEP 8 BEFORE STEP 4?

Answers were Sorted based on User's Feedback



IN MY JCL I VE 8 STEPS I WANT TO EXCUTE STEP 8 FIRST THEN EXCUTE STEP 4 ,HOW WILL EXCUTE STEP 8 BE..

Answer / ravikumar. r

You can IEBEDIT utility for your requirement. The syntax as
follows.

Syntax:
//JOBCARD
//PS010 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=path of your JCL,DISP=SHR
//SYSUT2 DD SYSOUT=(A,INTRDR)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
EDIT TYPE=INCLUDE,STEPNAME=(PS008,PS004)
/*

Is This Answer Correct ?    26 Yes 5 No

IN MY JCL I VE 8 STEPS I WANT TO EXCUTE STEP 8 FIRST THEN EXCUTE STEP 4 ,HOW WILL EXCUTE STEP 8 BE..

Answer / manish_cics

through DPRTY w'll excute step 8 before step 4 ,if u
provide step 8 higher prty compared to the step 4,then it
is possible to execute step 8 first.

Guys if I am wrong plz correct me

Is This Answer Correct ?    10 Yes 2 No

IN MY JCL I VE 8 STEPS I WANT TO EXCUTE STEP 8 FIRST THEN EXCUTE STEP 4 ,HOW WILL EXCUTE STEP 8 BE..

Answer / pradip

I propose a syntax below to meet the requirement,
excute first STEP008 then excute STEP004
//JOBCARD
//STEP001 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=path of your JCL,DISP=SHR
//SYSUT2 DD SYSOUT=(A,INTRDR)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
EDIT TYPE=INCLUDE,STEPNAME=(STEP008)
/*
//*
//STEP002 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=path of your JCL,DISP=SHR
//SYSUT2 DD SYSOUT=(A,INTRDR)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
EDIT TYPE=INCLUDE,STEPNAME=(STEP004)
/*

Is This Answer Correct ?    5 Yes 0 No

IN MY JCL I VE 8 STEPS I WANT TO EXCUTE STEP 8 FIRST THEN EXCUTE STEP 4 ,HOW WILL EXCUTE STEP 8 BE..

Answer / pradeep

Hi RaviKumar,

Your above solution is not working. It just executes both
the steps in the sequence with which it is defined in the
JCL.

I propose a syntax below to meet the requirement,

//JOBCARD
//PS010 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=path of your JCL,DISP=SHR
//SYSUT2 DD SYSOUT=(A,INTRDR)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
EDIT TYPE=INCLUDE,STEPNAME=(PS008)
/*
//PS020 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=path of your JCL,DISP=SHR
//SYSUT2 DD SYSOUT=(A,INTRDR)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
EDIT TYPE=INCLUDE,STEPNAME=(PS004)
/*

Here I have given a separate IEBEDIT to execute the same
JCL but different step exec seqeunce. As simple as that.
I would really wish if there is a much better solution to
the one that I have given here. :)

Is This Answer Correct ?    5 Yes 2 No

IN MY JCL I VE 8 STEPS I WANT TO EXCUTE STEP 8 FIRST THEN EXCUTE STEP 4 ,HOW WILL EXCUTE STEP 8 BE..

Answer / shridhar

Use DPRTY

1-1
2-2
3-3
4-8
5-5
6-6
7-7
8-4

Is This Answer Correct ?    3 Yes 1 No

IN MY JCL I VE 8 STEPS I WANT TO EXCUTE STEP 8 FIRST THEN EXCUTE STEP 4 ,HOW WILL EXCUTE STEP 8 BE..

Answer / muttaiah

@ Loga: If we use your option then we have to restart the
same job Twice to achieve this.

@ Pradip: Generally we won't be having that much time to
write a JCl with 2 steps and check the execution

If anyone can provide a simple solution that would be
better.

Sorry if you guys feel hurt but it's true!!!

Is This Answer Correct ?    0 Yes 0 No

IN MY JCL I VE 8 STEPS I WANT TO EXCUTE STEP 8 FIRST THEN EXCUTE STEP 4 ,HOW WILL EXCUTE STEP 8 BE..

Answer / loga

code restart parameter in jobcard as below.
JOBNAME JOB ,,MSGCLASS=***,NOTIFY=***,
RESTART=STEP8,COND(0,LE)
- only step 8 will execute

then change the jobcard with RESTART=STEP4,COND(0,LE)
- only step 4 wil be executed.

Is This Answer Correct ?    3 Yes 6 No

Post New Answer

More JCL Interview Questions

How Can we see all generations of a GDG ?

3 Answers   Polaris,


What are hierarchy levels in jcl?

0 Answers  


In JCL I have 5 steps,I need to execute 1st,2nd and 5th steps only,can any one answer me please?

2 Answers   TCS,


i have a jcl in which 4 & 5 step creates a new generation. 4th step output is as input for the 6th step & 5th step output is used as input in the 7th step. How they are refered as in the 6th & 7th steps? If the job abends in 6th step then how the 5th step output is refered in 7th step?

6 Answers   IBM,


if in a job, region is mentioned in both jobcard and in step then which is cosidered at the step level? A job has region 4k in jobcard and step1 with region 0k and step2 with 16k, then what is the region allocated for the entire job? what is the region step1 takes? what is the region step2 takes?

4 Answers  






How do you send the output of a COBOL program to a member of a PDS?

7 Answers  


How is a type of file defined in the jcl that executes the cobol program?

0 Answers  


which statement is used to end the in-stream procedure in a jcl?

1 Answers   IBM,


How can the attributes of one sms dataset be copied to another dataset?

0 Answers  


I have 5 steps in my job. say s1, s2, s3, s4, s5 //s1 exec ............. //s2 exec ............ //s3 exec .......... //s4 exec ........ //s5 exec ............... my question is i want to exeute only s2 and s4 steps... please advice me how to do this:

4 Answers   ITC Infotech, TCS,


How can we see data in TEMPARARY DATA SET in JCL ?

7 Answers   CSC, Polaris,


hello friends ,i have exam in Hsbc,pls any on send me placement papers and technical questions on mainframes,thank u

0 Answers   HF, iNautix,


Categories