How can I override a dsn that is contained in a proc called
by another proc? I need to do the override in the calling
JCL.
Answers were Sorted based on User's Feedback
Answer / muttiah
Let me frame the question in this way..
Say .. I have the job(Job1) which has a proc(proc1) and
this Proc1 is calling another Proc say Proc2..
So, you want to override the Dataset in a step of proc2 in
Proc1..This is possible..But overriding the dataset in
proc2 from the job1 is not possible.say proc A calls ProcB
and ProcB calls ProcC.. Then we can override details in
ProcC by ProbB only, but not with ProcA i guess you got the
point made.
//Job1 Job ....
//step1 exec proc1
//proc1 proc
//step1 exec proc2
//proc2 proc
//stepn exec pgm=iefbr14
//delstep dd dsn=Allinterivew.PS,disp=(mod,del,del),
// space=(trk,0)
Now change the code in proc1 as
//Proc1 proc
//step1 exec proc2
//stepn.delstep dd dsn=Deletefile.ps
In this way we can change the DS in proc2 from proc1. Hope
this makes much sense.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / piyush mani
//PROC1 PROC
//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=XYZ, DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
// PEND
//JJJ JCLLIB ORDER=PROCLIB PATH
//PROC2 PROC
//STEP2 EXEC PROC1
//JOBNAME JOB PARAMETERS
//JJJ JCLLIB ORDER=PROCLIB PATH
//PROC3 PROC
//STEP2.DD1 DSN=NEW NAME,DISP=SHR
THIS IS D WAY....
THIS PROG. WILL DO NOTHING IT'S JUST AN EXAMPLE..
GIV UR FEEDBACK
| Is This Answer Correct ? | 2 Yes | 3 No |
Answer / mani
CATALOG PROC
//CATPROC PROC
//STEP1 EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT=*
//DD1 DD DSN=FILEA,
// DISP=(,CATLG,DELETE),
// SPACE=(TRK,(100,50),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
//SYSOUT DD SYSOUT=*
//
INVOKING JCL
//Z000960P JOB CLASS=E,MSGCLASS=E,NOTIFY=&SYSUID
// JCLLIB ORDER=Z000960.SOURCE.JCL
//MYPROC EXEC CATPROC
//STEP1.DD1 DD DSN=FILEB,DISP=(NEW,CATLG)
AFTER EXECUTE THE JCL FILEB WILL BE GETTING OVERRIDE
| Is This Answer Correct ? | 1 Yes | 3 No |
i have 10steps and i want run step3 and based on step3 i want execute step7,8,9,10?in jcl
What will happen if we write two STOP RUN's in a COBOL program?
How to execute step2,step5,step7 of a proc of 10 steps? You are not allowed to change in JCL.
How is a dataset passed from one step to another?
i have a string of 80 chars i want to replace 4th char with "a"?
wht r different types of sort fields in jcl ?
if my GDG limit has been kept as 50 and if am trying to put 60 records.what would happen. will there be any abend for this scenario
I have a jcl which is using 2 data sets i want to override those data sets. how can i override the files within the JCL. Give me the syntax. Make sure that it is not calling any Proc.
How to concatenate different LRECL of files?
What are some jcl statements that are not allowed in procedures?
In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to split the 4 different outputs for each record how to do?
14 Answers Cap Gemini, Cognizant, JPMorgan Chase, TCS, Xansa,
How can a stopped job be started again?