DD statement

Use DD statements to define a data set.

The syntax for this statement supports two statement formats.

Syntax for format 1

//ddname  DD 
{
 SYSOUT=class | SYSOUT=([class],INTRDR)
 DUMMY | 
 DISP={status | (status[,normal_disp[,abnormal_temination_disp]])} 
  [{DSN|DSNAME}={dsname | dsname(membername)] 
  [DSNTYPE={PDS | LIBRARY}]
  [DDNAME=ddname]
  [DCB=(LRECL=record_length,BLKSIZE=block_size,RECFM=recfm)] 
  [DSORG=dsorg] 
  [SPACE=(alloc_unit,(primary,secondary[,directpory_blocks])[,RLSE] [,CONTIG])]
  [UNIT=unit_type]
  [VOL=SER=volume_name]
}
[RCCEXT={{ext | (ext1, ext2,…)} | RCCOUT | RCCSTD  | RCCERR}]
ddname
Do not code a ddname when the DD statement defines a data set that is concatenated to the data set of the preceding DD statement. In all other cases the ddname is required. By default, up to a maximum of 256 data sets may be concatenated on a single ddname. If user specifies -v MAXCATNUM=value in the rccbuild command line, the value will be used instead of 256.
SYSOUT
Use the SYSOUT parameter to identify this data set as a system output data set.
  • class specifies the output class (A, B, …Z, 0, 1, 2 …9, or *).
  • ([class],INTRDR) specifies an internal reader job. When INTRDR is specified, the user's JCL, written to this DD by the user program, is submitted to the internal reader. When class is neither blank nor *, the class is treated as the default output class for the user's JCL, unless you code the MSGCLASS parameter on the JOB statement.
    Note:
    • If LRECL=80 and RECFM=FB are not defined in a DD statement with INTRDR, the default output class will not be applied.
    • Do not code a non-blank character at column 72 on a JOB statement, including its continuation line in the user's JCL. Otherwise the default output class will not be applied.
    • DSN, DSNAME, DSORG=PO, and non-zero directory blocks are not supported in a DD statement with INTRDR.
    • You cannot use SYSOUT=([class],INTRDR) and the RCCEXT parameter in the same DD statement.
DUMMY
Use the DUMMY parameter to specify that:
  • No device or external storage space is allocated to the data set
  • No disposition processing is performed on the data set
  • No input or output operations are to be performed on the data set
DISP
status = The status of the disposition.
Valid values are site-dependent and may include the following. The default is NEW.
  • SHR
  • OLD
  • MOD
  • NEW
normal_disp = A normal disposition. Valid values are:
  • DELETE
  • KEEP
  • PASS
  • CATLG
  • UNCATLG

    The default is DELETE if the status is NEW. Otherwise, the default is KEEP.

abnormal_termination_disp = An abnormal termination. Valid values are:
  • DELETE
  • KEEP
  • CATLG
  • UNCATLG
The default is DELETE if status is NEW. Otherwise, the default is KEEP.
DSN|DSNAME
dsname = The data set name.

dsname(member) = The name of either a permanent partitioned data set (PDS) or of the partitioned data set extended (PDSE) and the name of a member within that data set.

If the member does not exist and if DISP=OLD or DISP=SHR is specified, the allocation will succeed, but the job will fail if the data set is opened for input.

If the member does not exist and if the data set is opened for output, the system adds the member to the data set.

DSNTYPE
Use the DSNTYPE parameter to specify the type of partitioned data set to allocate:
  • DSNTYPE=PDS allocates a partitioned data set.
  • DSNTYPE=LIBRARY allocates a partitioned data set extended (PDSE).
DDNAME=ddname
Use the DDNAME parameter to postpone defining a data set until later in the same job step. The value of ddname refers to a later DD statement that defines the data set. ddname must match the ddname of the referenced DD statement.
DCB
record_length = The LRECL (logical record length in bytes).

block_size = BLKSIZE (the block size in bytes).

recfm = RECFM (record format). Valid values are: {{F|V}[B][S] | U}[A |M].
  • F = fixed
  • V= variable
  • U = undefined
  • B = blocked
  • S = Either standard blocks or spanned blocks
    • For fixed-length records, this code indicates that the records are written as standard blocks, which means that (except for the last block or track), the data set contains no truncated blocks or unfilled tracks within the data set.
    • For variable-length records, this code indicates that a record can span more than one block.
  • A = ANSI/ISO control character
  • M = machine control character
You can specify the keyword parameters for DCB, LRECL, BLKSIZE, and RECFM in any order.
DSORG
dsorg = data set organization. Valid values are: {PS | PO}
  • PS = physical sequential data set
  • PO = partitioned data set
SPACE
Use the SPACE parameter to allocate space for a new data set. This parameter is required when allocating a new data set.
alloc_unit = The total number of bytes that are available for storage. Valid values are: {TRK | CYL | number_of_bytes}
  • TRK = The allocation unit is in tracks
  • CYL = The allocation unit is in cylinders
  • number_of_bytes = The allocation unit, in the average number of bytes for blocks or records. There are three further considerations for this designation:
    • primary = The number of alloc_unit (allocation units) to be allocated initially
    • secondary = The number of alloc_unit (allocation units) to be allocated if additional allocations are required
    • directory_blocks = The number of 256-byte records needed in the directory of a partitioned data set (PDS).
  • RLSE = The space allocated, but not used, to an output data set that is to be released when the data set is closed.
  • CONTIG = Requests that the space allocated to the data set must be contiguous. This subparameter affects only primary space allocation.
UNIT
unit_type = The device-type (such as 3390) or group-name (such as DASD). Valid values for the unit name are site-dependent.
VOL=SER
volume_name = The serial number of the volume on which the data set resides or will reside.
RCCEXT
This parameter provides for the following options:
  • RCCEXT={{ext | (ext1,ext2, …)} | RCCOUT | RCCSTD | RCCERR}

    The RCCEXT parameter specifies files to be uploaded or downloaded between the remote build client (Windows®, UNIX®, or Linux®) and the remote build server (z/OS®) platforms.

    If RCCEXT=ext or RCCEXT=(ext1,ext2,…) is specified, the files on the remote build client with the specified extensions are mapped to this data set for uploading or down loading.

    The rccbuild options, -i and -d, indicate that files with the specified extensions are uploaded to the dataset with the file names (without the extensions) mapped to corresponding member names in the target data set.
    Note: The target data set must be a PDS (partitioned data set).
    File names are mapped to PDS member names according to the following rules:
    • The directory path of a file name is not used.
    • All characters of a file name up to and including the rightmost forward or back slash (/ or \) are discarded.
    • Lowercase characters are converted to uppercase characters.
    • The file extension is stripped from the right, up to and including the separating period.
    • The extension, minus the period, is used by the z/OS server to direct the file to particular data sets according to RCCEXT parameters in the BCL statement.
    • The remaining name is truncated (from the right) to a maximum of eight characters.
    • Underscore characters (_) in a file name are converted to at signs (@).
    After this name mapping, the file names selected by the file name extension(s) must be:
    • valid PDS member names
    • unique (within the PDS)

    Upload example:

    The build command, rccbuild –h …. –i c:\myCOBOLpaths\mainPgm.CBL ….

    used with BCL,
    //MYINPUT   DD   RCCEXT=CBL, ….
    causes the mainPgm.CBL file to be uploaded and placed in the MYINPUT data set with the MAINPGM member.

    Download example:

    The build command, rccbuild –h … -o MAINPGM.LOD …

    used with BCL,
    //SYSLMOD   DD   RCCEXT=LOD,  .
    causes member MAINPGM in the SYSLMOD data set to be downloaded to the MAINPGM.LOD file.
  • RCCEXT=RCCOUT
    This option specifies that the contents of the data set referenced by this DD statement is to be downloaded to the remote build client platform with the file name of “prefix.stepname.ddname, where:
    • prefix = The value, if any, specified with the rccbuild –P option.
    • stepname = The step name in the EXEC statement for the step in which this DD statement is specified.
    • ddname = The ddname of this DD statement.
  • RCCEXT={RCCSTD | RCCERR}

    This option specifies that the contents of the data set referenced by this DD statement are downloaded to the remote build client platform whose file name is prefix.COMPILE.SYSOUT.

    prefix = the value, if any, specified with the rccbuild –P option

Example:

Use the DSORG parameter outside the DCB parameter. Do not use DSORG inside the DCB parameter.
//DDNAME1  DD DSN=A.B.C,DISP=(NEW,CATLG),
//             DCB=(RECFM=FB,BLKSIZE=3120,LRECL=80),
//             DSORG=PO,
//             SPACE=(32000,(30,10))
//DDNAME2  DD *
Note:
  • You can specify the key word parameters, DISP, DSN, DCB, DSORG, SPACE, UNIT, VOL, and RCCEXT in any order.
  • You cannot use SYSOUT=([class],INTRDR) and the RCCEXT parameter in the same DD statement.
  • DSORG is ignored if you specify it inside of the DCB parameter, such as DCB=(RECFM=FB,DSORG=PO). You will see a message like "'DSORG' is invalid and ignored. BCL processing and the build are being continued."

Syntax for format 2

The format 2 DD statement specifies an in-stream data set. It must be used with the ddname of SYSIN. This DD statement must be followed by in-line data (may be null), followed by a delimiting statement.

//SYSIN DD *[,DLM=xx] 
DLM=xx
Specifies an alternative indicator for the end of the in-stream data. When this parameter is used, /* and // can be included as part of the in-stream data.

Example

//SYSIN   DD   *
     record 1
     record 2
     …
     record n 
/*
The following example illustrates use of the DLM parameter:
//ddname DD *,DLM=xx
line1
line2
xx