View previous topic :: View next topic
|
Author |
Message |
rajulan
New User
Joined: 11 Jan 2008 Posts: 66 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
rajulan
New User
Joined: 11 Jan 2008 Posts: 66 Location: India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
Back to top |
|
|
rajulan
New User
Joined: 11 Jan 2008 Posts: 66 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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... and as far as the scope of DISP goes I was not wrong I believe... |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
rajulan
New User
Joined: 11 Jan 2008 Posts: 66 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
You're welcome
d |
|
Back to top |
|
|
|