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 |
wht r s722,s822,s122 and s222 abends pls reply fast
Explain how can the attributes of one sms dataset be copied to another dataset?
Can I send output of job to my remote device careerride123?
what is the difference between perform varying and perform
In my job I have 6 steps. Step01,02,03...step06. after executing step02 i want to skip step03 and want to execute step04. and once step04 is done then I want to go back and execute step03. once step03 is completed I want execute step05, 06 and so on... can any one tell me how do i do that???
We have two PS files,want to compare those files and put the duplicate records in one file. Input file 1 contains(1,2,4,9,10) Input file 2 contains (1,4,5,11,12,14,16). Help me with jcl.
Explain the hierarchy levels in jcl?
What is the difference between sb37,se37,sd37 each?
What are the parameter we cannot use in procedure?
How is the keyword DUMMY used in JCL?
Can we create VSAM file by using IEBGENER?
//ERFDS JOB //STEP1 //STEP2 //STEP3...COND=(4,LT) //STEP4 1.CONDITION IN STEP3 REFERS TO WHICH STEP'S RETURN CODE (STEP1 OR STEP2)? 2.IN ABOVE PROGRAM IF CONDITION SATISFIES IN STEP3 WHICH STEPS WILL EXECUTE?? AND WHY? IF CONDITION IN STEP3 SATISFIES