OFILE

Purpose

The OFILE command writes the currently displayed data set list to a user-defined file. There are three steps to using the OFILE command:
  1. Enter OFILE with the OPEN keyword to dynamically allocate the user file and open it
  2. Enter OFILE without any keywords to send the list of data sets to the file.
  3. Enter OFILE with the CLOSE keyword to close the file and free the dynamic allocation.

Syntax

OFILE

Read syntax diagramSkip visual syntax diagramOFILEOFOPENdsnameOLDMODNEWSHRCLOSE

Parameters

dsname
is a fully-qualified data set name (enclosed in single quotation marks). If you do not enclose the data set name in quotes, your TSO/E PROFILE PREFIX is used as the high-level qualifier.
CLOSE
Specifies that the data set identified by dsname is to be closed and to free the dynamic allocation. CLOSE can be abbreviated as C.
OPEN
Specifies that the data set identified by dsname is to be dynamically allocated and opened for output by the OFILE command.
OLD
Specifies that the data set identified by dsname is an existing data set that is to be overwritten with the new data set list. OLD is the default.
MOD
Specifies that the data set identified by dsname is either an existing data set, to which the new data set list is to be appended, or a new data set, to which the list will be written.
NEW
Specifies that the data set identified by dsname is a new data set, which will be allocated and cataloged.
SHR
Specifies that the data set identified by dsname is an existing data set that is to be overwritten with the new data set list.

Results

The output data sets written by OFILE are in fixed block (FB) format with a record length (LRECL) of 120 bytes. The record format is displayed in the following table:
Columns Field size Description
1–44 44 Data set name
45 01 Data set merged flag
46 01 Data set changed flag
47–50 04 Record format (RECFM)
51–54 04 Data set organization (DSORG)
55–59 05 Logical record length (LRECL)
60–64 05 Reserved for IBM® use
65–70 06 Logical volume
71–78 08 Physical volume or SMS storage class
79–82 04 Device number
83–90 08 Generic or esoteric unit name
91–98 08 Device type
99–102 04 Space required (in cylinders)
103–120 18 Reserved for IBM use

When the OFILE command is issued from panel CPPP6071, however, the output data set is written in (VB) format with a LRECL of 7086.

Examples

Here are the three steps required to send the list of data sets to a new file:
  1. Enter OFILE OPEN "MY.OFILE.TEXT" NEW to open a new file MY.OFILE.TEXT.
  2. Enter OFILE without any keywords to send the list of data sets to MY.OFILE.TEXT.
  3. Enter OFILE CLOSE to close and free MY.OFILE.TEXT.