Space announcement This documentation space provides the same content as before, but the organization of the content has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

Types of files that can be allocated for COBOL


This section describes some common types of data sets that can be allocated using the File Allocation Utility.

Existing Data sets

Existing data sets can be allocated with a disposition of SHR, OLD, or MOD. Unless exclusive use of a data set is required for your application, SHR is the recommended disposition.

A data set allocation with the disposition of SHR, OLD, or MOD fails if:

  1. You request disposition OLD/MOD, but the data set is already allocated to another user.
  2. You request disposition SHR, but the data set is already allocated exclusively OLD/MOD to another user.
  3. The data set is not found (SHR or OLD only).

Important

For uncataloged data sets, enter the name of the volume on which the data set resides in the VOLUME field on the Edit File List 2 screen.

For concatenating data sets, 1) list the data set with the largest block size first; 2) code the dsnames of the data sets to be concatenated on successive lines, leaving the DDNAME field blank after the first line; and 3) concatenate a maximum of 255 sequential or 16 partitioned data sets.

New Data sets

To allocate a new data set, values must be supplied for the DDNAME, DSNAME, DISP (NEW), UNITS, PRIMARY, and SECONDARY fields on the Edit File List screens. A value must be entered in the DIR field if you are allocating a PDS. If no value is entered in the DIR field, the DSORG is assumed to be PS (physical sequential).

Values must also be supplied for the RECFM, LRECL, and BLKSIZE fields unless these parameters are coded in the program itself. Some versions of MVS will calculate an optimum blocksize. For these systems, the BLKSIZE field should be left blank or set to zero. If your version of MVS does not provide this, the FAU will calculate an optimum block size (based on an installation specification) if you enter the RECFM and LRECL and leave the BLKSIZE blank.

For a new or temporary data set, values are pre-filled for the UNITS, PRIMARY, SECONDARY, RLSE, and DEL? fields. YES is entered in the RLSE field to release unused space when the data set is closed. Entering YES in the DEL? field tells Code Debug TSO to delete the old file, if any, when attempting to allocate a new data set.

If your installation requires it, a value must be specified for the UNIT and VOLUME fields on the Edit File List 2 (space and catalog information) screen.

Dummy Files

Dummy files are generally used for nonessential input and output. These files can also be used to test program flow without actually processing data. For instance, unwanted output can be suppressed by giving the output data sets a dummy status.

Since dummy files do not exist, DCB requirements are the same as for a new data set. However, since no real allocation occurs, space information is not used.

Temporary Files

Temporary data sets are often used to allocate sort or other work files. Since a temporary file usually has no dsname, the data it contains is lost whenever the file is freed or when you log off.

Temporary data sets defined with the TEMP keyword have a system-generated, unique name. They must generally be allocated as new data sets. Temporary data sets using an &&name form also have a system-generated name. They cannot be cataloged and are automatically deleted when the allocation creating them is freed. Thus, they can only be allocated as OLD while the allocation creating them still exists.

Space and DCB requirements are the same as for other new (or existing) data sets.

In-Stream Data

The data for the program can be provided as part of the file list. To use this feature, specify an asterisk (*) as the data set name for the data. You can then use the EDIT and BROWSE commands to create, modify, and review the data associated with the allocations.

Since these data sets are temporary, the allocation and DCB parameters are the same as for temporary data sets. Additionally, since the data is manipulated via the ISPF/PDF editor, the DCB information must be consistent with ISPF/PDF (fixed or variable length records and LRECL of 0 to 255 bytes). Also, for compatibility with normal JCL conventions, the RECFM defaults to FB and the LRECL defaults to 80. If variable length records are specified, LRECL defaults to 84.

Allocating Files to the Terminal

Sequential files can be allocated to the terminal. SYSOUT files (COBOL DISPLAY verb) are often allocated to the terminal. The files can be opened for input or output. Unlike other forms of new data sets, a block size is not required.

If an input file is allocated to the terminal, Code Debug TSO suspends the execution of your program while awaiting terminal input. The keyboard is unlocked and Code Debug prompts you to enter data. A slash asterisk (/*) is entered to indicate the end of the file.

SYSOUT Files

The SYSOUT parameter instructs the system to queue the output on a direct access volume, and system output writers later transcribe the output onto the specified I/O device. To allocate a SYSOUT file, enter a ddname in the DDNAME field and the SYSOUT=class parameter in the DSNAME field. The SYSOUT class can be any alphanumeric (A-Z, 0-9) character or an asterisk (*) - default. As with a terminal file, a block size is not required.

HFS Files

An HFS data set is a Hierarchical file under UNIX (USS). To allocate an HFS file, enter a ddname in the DDNAME field and the keyword HFS in the DSNAME field. The PATHNAME, as well as other path parameters, can be entered on the HFS PARMS screen (HFS PARMS Screen (SH)). The PATHNAME field is case sensitive, and no quotes are required as part of the specification.

Generation Data sets

A generation data group (GDG) is a collection of cataloged data sets that have the same name and are related to one another chronologically. A GDG can consist of sequential, partitioned, and direct data sets residing on direct access volumes. The GDG dsname is limited to 35 characters. Each generation can be distinguished from the others by its relative or absolute generation number. A relative generation number cannot exceed 255.

To create or retrieve a generation data set, enter the GDG name, followed by its relative (or absolute) number in the DSNAME field. If a relative generation number is used, you cannot also specify a member name.

If GDG stability was set to YES during the installation process, the relative generation numbers remain static during a TSO session. Specifically, if you create a new generation with a relative generation number of +1 and you want to refer to it later during your session, continue to refer to it as +1.

If GDG stability was set to NO during the installation process, the positive relative numbers will always allocate a new data set relative to the current generation, notwithstanding any prior use of the same generation.

This stability has implications when multiple new generations are allocated in TSO, but are not allocated in ascending order. You must assume that a GDG has 25 generations at TSO logon time and that the following allocations have been made:

ALLOCATE              STABILITY=NO                STABILITY=YES
 GDG(+2)         creates G0027V00  (25+2)      allocates G0027V00
 GDG(+1)         creates G0028V00  (27+1)      allocates G0026V00
 GDG(0)        allocates G0028V00  (28+0)      allocates G0025V00

On the DCB PARMS screen, enter the name of a fully qualified data set where Code Debug TSO can obtain the model DCB information, unless a model DSCB was created for the generation data group. If a PDS is specified, do not include a member name.

If all the generations in a GDG have identical DCB attributes, the generations can be retrieved together as a single data set. To process the entire GDG, enter its dsname without a relative generation number.

ISAM Files

ISAM files can be allocated, but certain IBM SVC 99 restrictions for ISAM files also apply:

  • The data and key areas must be in the same data set, on one volume.
  • The file cannot be NEW.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*