Previous Topic: SyntaxNext Topic: OUTLIM


Parameters

OUTFILE supports the following parameters:

dsname

Identifies the data set name and optional member that contain the output records. This data set is dynamically allocated. No JCL is needed to reference this dsname.

ddname

Specifies the one- to eight-character ddname of the output file. SYSUT1O is the default value.

CLOSE

This parameter value closes the OUTFILE after the command has completed processing. Subsequent commands write over any previously written data. CLOSE does not work on SYSOUT=* allocations. Output of these types remain open during the entire job. CLOSE is the default value, but it may have been changed during installation.

NOCLOSE

This parameter value does not close the OUTFILE after the command has completed processing. However, all data sets are closed before executing subsequent job steps.

When the NOCLOSE parameter is used, the current job step's subsequent command appends any additional records to the OUTFILE.

Note: Both dsname(member) and ddname are optional. If both are omitted, either the CLOSE or NOCLOSE option must be selected.

Example 1

This example syntax directs all output to the data set referenced by ddname NEWMSTR. The file is closed after the command completes

COPY, 
  OUTFILE(NEWMSTR)

Example 2

This example syntax directs any output to the data set referenced by the default ddname for OUTFILE. The shipped default value for this option is SYSUT1O, but may have been changed during installation. The default OUTFILE ddname is generated by first using the INFILE value, if supplied, and if not supplied, the installation default value, and appending an O to the end of the value. The file is not closed after the command completes. The execution of the current job step's next command appends any new output to the end of the OUTFILE.

COPY,
  OUTFILE(,NOCLOSE)

Example 3

This example copies the records referenced by the ddname OLDMSTR to the data set referenced by the ddname OLDMSTRO. Although the ddname OLDMSTRO is not supplied by the use of the OUTFILE keyword, the name is generated because of the use of the INFILE value.

COPY,
  INFILE(OLDMSTR)