How to create a LARGE dataset with Batch Processor?
search cancel

How to create a LARGE dataset with Batch Processor?

book

Article ID: 12334

calendar_today

Updated On:

Products

Batch Processor RC/Migrator for DB2 for z/OS

Issue/Introduction

The .ALLOC command allocates data sets in a similar manner as the TSO ALLOCATE command. This command can appear
anywhere within the Batch Processor for Db2 for z/OS (RBP) input file and can be used to allocate the necessary data sets for applications and utilities to utilize.
This command has many parameters one of which is the DSNTYPE. DSNTYPE specifies the format in which the data set is to be allocated.

How to code a dataset allocation to create a LARGE dataset with Batch Processor for Db2 for z/OS (RBP)
or RC/Migrator for Db2 for z/OS (RCM)?

Resolution

Starting with Database Management for Db2 for z/OS release r18, the LARGE attribute was added to the DSNTYPE parm of the .ALLOC statement.

Here is a sample alloc statement to create a LARGE type dataset:

.ALLOC FI(PTIREC)         +
DA('hlq.DATA')            +
TRACKS                    +
SPACE(100,100) RLSE       +
UNIT(SYSDA)               +
DSNTYPE(LARGE)

This is the syntax diagram from ALLOC command for the DSNTYPE parm:

[DSNTYPE(HFS|LIBRARY|PDS|PIPE|LARGE)]/

The LARGE parm is specified to allocate a large format data set. These data sets are physical sequential data sets
which are able to expand beyond the 65,535 tracks per volume limit.

This new parm can also be customized into an RC/Migrator MODEL such as a Fast Unload for example to produce code like this:

.ALLOC FI(SYSREC01)
      DA('hlq.DATA')                                                   +
       TRACKS                                                          +
       SPACE(2,3)                                                      +
       DSNTYPE(LARGE)                                                  +
       UNIT(SYSALLDA)                                                  +
       NEW CATALOG

Sample Model code showing how DSNTYPE can be used in a MODEL:

In the Symbols area add in a symbol:

DSNTYPE         LARGE

The Alloc statement would look like this:

.ALLOC FI(SYSREC01)                +
       DA('%DATADSN')              +
#IF(%DSNTYPE,EQ,LARGE)                 <----test for the value that is set in the symbols
       VOLSER(%VOLSER)             +
       TRACKS                      +
      #IF(%ALLOC2,LE,%TRKLIMIT)
       SPACE(%ALLOC1,%ALLOC2)      +
      #ELSE
       SPACE(%TRKLIMIT,%TRKLIMIT)  +
      #ENDIF
       DSNTYPE(%DSNTYPE)             +  <-------the %DSNTYPE will resolve to the value of DSNTYPE in the symbols
       UNIT(%UNIT)                 +
#ELSE
       VOLLIMIT(%VOLLIMIT)         +
       LABEL(%TINCR,%LABEL)        +
       VOLREF(%LASTUNLD)           +
       UNIT(%TAPE)                 +
       RETAIN                      +
#ENDIF
       DATACLAS(%DATACLAS)         +
       STORCLAS(%STORCLAS)         +
       MGMTCLAS(%MGMTCLAS)         +
       NEW CATALOG

Additional Information

Reference:

.ALLOC Command-Allocate Data Sets Dynamically

RC/Migrator : Utility Model Services