IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Want to override the Disp in the proc through the JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Thu May 25, 2006 4:04 pm
Reply with quote

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 icon_rolleyes.gif
Back to top
View user's profile Send private message
gskulkarni

New User


Joined: 01 Mar 2006
Posts: 70

PostPosted: Thu May 25, 2006 4:20 pm
Reply with quote

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
View user's profile Send private message
rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Thu May 25, 2006 4:25 pm
Reply with quote

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
View user's profile Send private message
sada_polaris

New User


Joined: 24 May 2006
Posts: 13

PostPosted: Fri May 26, 2006 10:09 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Proc print in Mainframe All Other Mainframe Topics 4
No new posts AN OVERRIDE MAY NOT TARGET OVERRIDING... JCL & VSAM 1
No new posts trying to set return code in PROC JCL & VSAM 15
No new posts Compare Two datasets and Override Mat... DFSORT/ICETOOL 7
No new posts Execute DSNTEP2 in REXX which is call... CLIST & REXX 4
Search our Forums:

Back to Top