Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Need to know the difference between keep and pass ....
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.

http://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

Site Director


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

PostPosted: Fri Feb 27, 2009 3:24 am    Post subject:
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

Moderator Team Head


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

PostPosted: Fri Feb 27, 2009 3:28 am    Post subject: Reply to: Need to know the difference between keep and pass
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    Post subject: Reply to: Need to know the difference between keep and pass
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: 8593
Location: Back in jolly old England

PostPosted: Fri Feb 27, 2009 1:53 pm    Post subject:
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

Senior Member


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

PostPosted: Fri Feb 27, 2009 3:45 pm    Post subject: Re: Reply to: Need to know the difference between keep and p
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: 743
Location: Germany

PostPosted: Fri Feb 27, 2009 5:22 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Feb 27, 2009 5:42 pm    Post subject: Re: Reply to: Need to know the difference between keep and p
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

Site Director


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

PostPosted: Fri Feb 27, 2009 10:59 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Sat Feb 28, 2009 1:41 am    Post subject:
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

Senior Member


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

PostPosted: Sat Feb 28, 2009 6:04 pm    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Tue Mar 03, 2009 11:13 pm    Post subject: Reply to: Need to know the difference between keep and pass
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Sticky: difference between ... DUMMY ... and ... enrico-sorichetti JCL & VSAM 0 Mon Oct 17, 2016 4:31 pm
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm
No new posts Difference space showed for TS and it... autobox DB2 1 Thu Apr 14, 2016 1:07 pm
No new posts Difference Between CICS WebSupport an... sachinji84 CICS 1 Mon Mar 07, 2016 7:25 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us