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

define 1 DCB parms for multiple output datasets


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

New User


Joined: 09 Feb 2021
Posts: 26
Location: United States

PostPosted: Fri Sep 17, 2021 9:02 pm
Reply with quote

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
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1314
Location: Vilnius, Lithuania

PostPosted: Fri Sep 17, 2021 9:23 pm
Reply with quote

Use symbolics!
Back to top
View user's profile Send private message
dot1q3
Warnings : 1

New User


Joined: 09 Feb 2021
Posts: 26
Location: United States

PostPosted: Fri Sep 17, 2021 9:28 pm
Reply with quote

besides symbolics icon_smile.gif

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Fri Sep 17, 2021 11:47 pm
Reply with quote

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
View user's profile Send private message
dot1q3
Warnings : 1

New User


Joined: 09 Feb 2021
Posts: 26
Location: United States

PostPosted: Sat Sep 18, 2021 12:26 am
Reply with quote

thanks for confirmation and suggestions.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2127
Location: USA

PostPosted: Sat Sep 18, 2021 12:54 am
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1329
Location: Bamberg, Germany

PostPosted: Sat Sep 18, 2021 11:22 am
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2127
Location: USA

PostPosted: Sat Sep 18, 2021 7:22 pm
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2127
Location: USA

PostPosted: Sat Sep 18, 2021 7:35 pm
Reply with quote

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
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 590
Location: London

PostPosted: Fri Sep 24, 2021 2:38 pm
Reply with quote

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
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 REXX/CMS How to place command console... CLIST & REXX 4
No new posts combine multiple unique records into ... DFSORT/ICETOOL 2
No new posts Reroute print output via REXX/SDSF TSO/ISPF 6
No new posts JES datasets IO Error ABENDS & Debugging 3
No new posts Concatenate 2 input datasets and give... JCL & VSAM 2
Search our Forums:

Back to Top