|
View previous topic :: View next topic
|
| Author |
Message |
dot1q3 Warnings : 1 New User
Joined: 09 Feb 2021 Posts: 26 Location: United States
|
|
|
|
hi,
if multiple output datasets have the same dcb such as:
disp
space
recfm
lrecl
is there an option to define/declare 1 dcb parm for multiple datasets
for example,
| Code: |
//OUT1 DSN=OUT1.XXX,DISP=(,CATLG,),RECFM=FBA,LRECL=80,SPACE=(TRK,(800),RLSE)
//OUT2 DSN=OUT2.XX,DISP=(,CATLG,),RECFM=FBA,LRECL=80,SPACE=(TRK,(800),RLSE)
//OUT3 DSN=OUT3.XX,DISP=(,CATLG,),RECFM=FBA,LRECL=80,SPACE=(TRK,(800),RLSE)
|
instead of writing the same for all 3 out dsn, can we define it once somewhere so i dont have to copy/paste it?
thx |
|
| Back to top |
|
 |
prino
Senior Member

Joined: 07 Feb 2009 Posts: 1323 Location: Vilnius, Lithuania
|
|
|
|
| Use symbolics! |
|
| Back to top |
|
 |
dot1q3 Warnings : 1 New User
Joined: 09 Feb 2021 Posts: 26 Location: United States
|
|
|
|
besides symbolics
so there's no way to say something like this:
OUT1 - OUT3 use DISP=(,CATLG,),RECFM=FBA,LRECL=80,SPACE=(TRK,(800),RLSE |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
| Quote: |
so there's no way to say something like this:
OUT1 - OUT3 use DISP=(,CATLG,),RECFM=FBA,LRECL=80,SPACE=(TRK,(800),RLSE |
You are correct -- you cannot do this.
I can think of at least three ways to accomplish the same goal, though:
1. Put the duplicated parameters into an INCLUDE member so you can use a continuation statement and INCLUDE the parameters
2. If the data sets are SMS, use the LIKE parameter
3. If the data sets are SMS, have your system support group define a data class that contains the parameters you want and then you just have to use DATACLAS= in your job. |
|
| Back to top |
|
 |
dot1q3 Warnings : 1 New User
Joined: 09 Feb 2021 Posts: 26 Location: United States
|
|
|
|
| thanks for confirmation and suggestions. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2272 Location: USA
|
|
|
|
| dot1q3 wrote: |
hi,
if multiple output datasets have the same dcb such as:
disp
space
recfm
lrecl
is there an option to define/declare 1 dcb parm for multiple datasets
|
Hey-hey,
First of all, neither SPACE nor DISP do belong to the category of “DCB parameters”. They are rather DD-statement operands.
Second, if the issue of repeating two parameters for three times is the most serious one in your career, then you are a happy person, facing no problems in this life. |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1430 Location: Bamberg, Germany
|
|
|
|
| Robert Sample wrote: |
| 2. If the data sets are SMS, use the LIKE parameter |
I would use both, DCB (with backward reference) and LIKE.
| Robert Sample wrote: |
| 3. If the data sets are SMS, have your system support group define a data class that contains the parameters you want and then you just have to use DATACLAS= in your job. |
In my shop I will never accept an inflation of Dataclasses for such a minor purpose. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2272 Location: USA
|
|
|
|
| Joerg.Findeisen wrote: |
| Robert Sample wrote: |
| 2. If the data sets are SMS, use the LIKE parameter |
I would use both, DCB (with backward reference) and LIKE. |
The parameter LIKE supports only reference to an existing (model) DSN; backward DD reference is not allowed. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2272 Location: USA
|
|
|
|
Rule #1: the operation code DD is mandatory.
Rule #2: the values substituted via variables or other options MUST be defined as separate logical elements; otherwise the code becomes a sort of garbage.
| Code: |
// SET DCBOUT=‘RECFM=FBA,LRECL=80’
// SET SPACEOUT=‘TRK,(800),RLSE’
// SET DISPOUT=‘NEW,CATLG’
// . . . . . . . .
//OUT1 DD DSN=OUT1.XX,DISP=(&DISPOUT),DCB=(&DCBOUT),SPACE=(&SPACEOUT)
//OUT2 DD DSN=OUT2.XX,DISP=(&DISPOUT),DCB=(&DCBOUT),SPACE=(&SPACEOUT)
//OUT3 DD DSN=OUT3.XX,DISP=(&DISPOUT),DCB=(&DCBOUT),SPACE=(&SPACEOUT)
|
|
|
| Back to top |
|
 |
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 599 Location: London
|
|
|
|
Using LIKE=model.dsn where the model dataset has the required attributes is the easiest, I use it a lot. But note that it will not model the Dataclas which can be an issue sometimes. It will model the DCB and SPACE, but obviously not DISP.
The dataset specified on LIKE= cannot be a relative GDG generation such a GDG.BASE(0), but can be an absolute GDG generation such as GDG.BASE.G0001V00
Another option is to use the REFDD parameter but I have never really used it myself.
You could ask your site Storage people if there is a Dataclas to match your requirements, or go to ISMF Option 4 and list the Dataclases yourself to see what's available. It is unlikely your Storage people will define a new Dataclas for you unless it is going to become very commonly used. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|