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

Need to know the difference between keep and pass ....


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

New User


Joined: 11 Jan 2008
Posts: 66
Location: India

PostPosted: Fri Feb 27, 2009 3:17 am
Reply with quote

Hi all,

I need to know the exact difference of Keep and Pass disposition in jcl.

I have searched the forum too.

www.ibmmainframes.com/about15051.html


From the above link i got the theoritical information.


Code:
                   
//STEP1    EXEC PGM=IEFBR14                                         
//RAJU     DD DSN=OZA150.RAJULAN.TEST1,                         
//            DISP=(,KEEP,DELETE),                           
//            UNIT=SYSDA,                                       
//            SPACE=(TRK,(1,1),RLSE),                           
//            RECFM=FB,LRECL=80
//*
//STEP2    EXEC PGM=IEBGENER                                     
//SYSPRINT DD SYSOUT=*                                       
//SYSUT1   DD DSN=OZA150.RAJULAN.TEST1,DISP=SHR                 
//SYSUT2   DD DSN=OZA150.RAJULAN.TEST2,                         
//            DISP=(,CATLG,DELETE),
//            UNIT=SYSDA,                                 
//            SPACE=(TRK,(1,1),RLSE)
//SYSIN    DD DUMMY


As per the explantion I executed the above code without any Vol=ser

but it was executed fine. And I don't have a clear idea about Pass too.

Can any one provide some example code for Keep and Pass so that I can know how it works?

Thanks,
Rajulan.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Fri Feb 27, 2009 3:24 am
Reply with quote

Hello,

At the top of the page is a link to "IBM Manuals". Among them is the "JCL Reference" for current releases of the operating system.

In the JCL manual for your system, look at the DISP parameter of the DD statement.

If you find something that is not clear, post what you found and your question. Someone will be able to clarify.

It is far easier and better to get the description straight from the source (IBM).
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Feb 27, 2009 3:28 am
Reply with quote

I'm not sure what point you're trying to understand.

Code:

//            DISP=(,KEEP,DELETE) or DISP=(NEW,KEEP,DELETE)

is the same as

//            DISP=(,CATLG,DELETE) or DISP=(NEW,CATLG,DELETE)


You can't code KEEP unless it's a VSAM dataset or it's already been cataloged.
Back to top
View user's profile Send private message
rajulan

New User


Joined: 11 Jan 2008
Posts: 66
Location: India

PostPosted: Fri Feb 27, 2009 1:24 pm
Reply with quote

Hi,

I have gone through the manuals. For my understanding i need some sample code. For ex. how we use pass for subsequent steps? How we refer keep in the next step? Where do we give vol=ser? Why keep is for vsam and only dataset which is catloged?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Fri Feb 27, 2009 1:53 pm
Reply with quote

The disposition parameters used in a step are for that step only. What ever disp parameters are in use in subsequent steps are the parameters that will be honoured for that step.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Fri Feb 27, 2009 3:45 pm
Reply with quote

rajulan wrote:
I have gone through the manuals. For my understanding i need some sample code. For ex. how we use pass for subsequent steps? How we refer keep in the next step? Why keep is for vsam and only dataset which is catloged?
You are asking a lot of questions..

Syntax for DISP is:
Code:
 {DISP=({status}{,normal-termination-disp}{,abend-disp})
or, more precisely,
Code:
      {NEW} {,DELETE  } {,DELETE }   
      {OLD} {,KEEP    } {,KEEP   }   
DISP= {SHR} {,PASS    } {,CATLG  }   
      {MOD} {,CATLG   } {,UNCATLG}   
      {,  } {,UNCATLG }             
            {,        }             

You can leave off the parentheses if you code only the status subparameter (the 1st subparameter, as in DISP=OLD.)

1. PASS: The data set will be passed to a subsequent step in the same job. Its final disposition will be determined by that step.

2. KEEP: The data set will be kept on the volume when the step ends normally. KEEP is the only valid termination disposition for a VSAM data set. VSAM files shouldn't be cataloged, uncataloged, passed, or deleted.

"KEEP" tells the system "to keep" the DSN, unless you already have the DSN (in other words, unless you already have the DSN cataloged) you can't keep it..quite natural, isn' it?

Quote:
Where do we give vol=ser?
Why this question is merged with DISP question? 'am not sure, are you thinking about MOD parameter? Please clarify.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Fri Feb 27, 2009 5:22 pm
Reply with quote

Hi Anuj D. !

>> VSAM files shouldn't be cataloged, uncataloged, passed, or deleted

Ups, to catalog or delete VsamFiles you use IDCAMS, i think.
Or did I missed the connection since the last 20 years.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Fri Feb 27, 2009 5:42 pm
Reply with quote

Anuj D. wrote:
IWhy this question is merged with DISP question? 'am not sure, are you thinking about MOD parameter? Please clarify.

No, he just used DISP=MOD when posting icon_lol.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Fri Feb 27, 2009 10:59 pm
Reply with quote

Hello,

Quote:
I have gone through the manuals. For my understanding i need some sample code.
Using the info you found in the manual, create some sample code to experiment with. Using only IEFBR14 and IEBGENER you can set up multiple situations and see how the different options work.

If you find something that is not clear when your run it or if you get an error that cannot be explained, post your jcl and the question and/or error here and someone will be able to clarify.

Something to consider is that normally, a solution is found for a requirement. You are trying to find requirements so that different solutions can be tried. Given that there is no actual requirement - you have complete flexibility to try many combinations icon_smile.gif
Back to top
View user's profile Send private message
rajulan

New User


Joined: 11 Jan 2008
Posts: 66
Location: India

PostPosted: Fri Feb 27, 2009 11:32 pm
Reply with quote

Hi Anuj,

thx for your valuable information...i am breaking my head to know all those things...Now i have some idea.


Why i asked abt vol=ser was i studied some book. if u code keep, then vol=ser is must ....


To expat,

I did not use disp=mod when posting


To dick,

I will come up with code if i have a doubt further. Thanks for ur suggestions.


Thanks,
Rajulan R.C
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Sat Feb 28, 2009 1:41 am
Reply with quote

Hello,

Quote:
if u code keep, then vol=ser is must ....
Not necessarily. Most production jcl that references a cataloged dataset uses (OLD,KEEP) and thre is no need to specify the volser. . .
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Sat Feb 28, 2009 6:04 pm
Reply with quote

UmeySan wrote:
Or did I missed the connection since the last 20 years.
No, You didn't miss anything - with this much of exp. they can't dare to do that... icon_smile.gif and as far as the scope of DISP goes I was not wrong I believe...
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Mar 02, 2009 6:41 pm
Reply with quote

Hi Rajulan,

You said
Quote:
if u code keep, then vol=ser is must ....

You are correct only if you created the DS using KEEP or if you didn't catalog it later.

If the DS is not cataloged, then you're right, you must use vol=ser or vol=ref to access it.
Back to top
View user's profile Send private message
rajulan

New User


Joined: 11 Jan 2008
Posts: 66
Location: India

PostPosted: Tue Mar 03, 2009 5:07 pm
Reply with quote

Thanks all...Now i have an idea abt this disposition parameter.

Quote:
Most production jcl that references a cataloged dataset uses (OLD,KEEP) and thre is no need to specify the volser. . .


dick, i got it how to mention keep without mentioning vol=ser.


Thanks,
Rajulan R.C
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue Mar 03, 2009 11:13 pm
Reply with quote

You're welcome icon_smile.gif

d
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 Is this possible via sort (in one pass)? SYNCSORT 4
No new posts Difference between joblib and steplib JCL & VSAM 2
No new posts Pull data using date difference betwe... DB2 6
No new posts Difference between PLT txn and schedu... CICS 3
No new posts How to pass the PARM value to my targ... COBOL Programming 8
Search our Forums:

Back to Top