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.
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.
Joined: 15 Aug 2015 Posts: 1335 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.
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)
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.