|
View previous topic :: View next topic
|
| Author |
Message |
Prasanthhere
Active User

Joined: 03 Aug 2005 Posts: 306
|
|
|
|
I have a JCl say X which is calling a Proc Y in the First step
In the Proc there are about 10 steps
In the first step its creating a dataset whose disp is (mod,delete,delete)
If I want to override the Disp in the proc through the JCL how can we do that?
My requirement is to change the disp to (old,delete,delete) without changing the proc and by using the JCL which is calling the proc
Could you please share ur thoughts  |
|
| Back to top |
|
 |
gskulkarni
New User
Joined: 01 Mar 2006 Posts: 70
|
|
|
|
In JCL after EXEC PROC statement you can give the override
//PROC EXEC your_proc,
// OUTD1=*
//STEP010.dataset DD DSN=your_data_set_name, DISP=(OLD,DELETE,DELETE).
The MOD,DELETE,DELETE will ensure that if that dataset was present it gets deleted, and if it was not present it will still go ahead without stopping the process.
OLD,DELETE,DELETE will cause the process to stop if the dataset is not present at the start of teh JCL, right? Is that what you want? |
|
| Back to top |
|
 |
rajandhla
Active User
.jpg)
Joined: 18 Oct 2005 Posts: 182 Location: Luton UK
|
|
|
|
You can use overding the ddname in the step by coding stepname.ddname
or u can use symbolic parameter concept
please find example for symbolic parameter concept.
//DEF PROC STATUS=OLD,LIBRARY=SYSLIB,NUMBER=777777
//NOTIFY EXEC PGM=ACCUM
//DD1 DD DSNAME=MGMT,DISP=(&STATUS,KEEP),UNIT=3400-6,
// VOLUME=SER=888888
//DD2 DD DSNAME=&LIBRARY,DISP=(OLD,KEEP),UNIT=3350,
// VOLUME=SER=&NUMBER
Three symbolic parameters are defined in this cataloged procedure: &STATUS, &LIBRARY, and &NUMBER. Values are assigned to the symbolic parameters on the PROC statement. These values are used when the procedure is called and values are not assigned to the symbolic parameters on the calling EXEC statement.
Regards
jai |
|
| Back to top |
|
 |
sada_polaris
New User
Joined: 24 May 2006 Posts: 13
|
|
|
|
The other way.
//.... job
//JSTY0010 exec proc=<proc name>
//JSTY0010.PSTY0010 DD DISP=(OLD,DELETE,DELETE)
If the proc step PSTY0010 will have only one DD. If the are more that one
DD then we need to be specific as below.
//.... job
//JSTY0010 exec proc=<proc name>
//JSTY0010.PSTY0010 DD DSN=.....,DISP=(OLD,DELETE,DELETE)
Also for ypur informatin, if you give (Mod,delete,delete) this disp position will delete the dataset. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|