Previous Page | Next Page

Statements under z/OS

FILENAME Statement: z/OS



Associates a SAS fileref with an external file.
Valid: anywhere
z/OS specifics: fileref, device-type, physical-filename, host-options
See: FILENAME Statement in SAS Language Reference: Dictionary

Syntax
Standard File Options for the FILENAME Statement
DCB Attribute Options
DCB Option Descriptions
Overview of DCB Attributes
Options That Specify SMS Keywords
SYSOUT Data Set Options for the FILENAME Statement
Subsystem Options for the FILENAME Statement
Host-Specific Options for UNIX System Services Files
See Also

Syntax

FILENAME fileref <device-type> 'physical-filename' <ENCODING=encoding-value> <host-options>;
FILENAME fileref <device-type> ('physical-filename-1'... 'physical-filename-n') <ENCODING=encoding-value> <host-options>;
FILENAME fileref | _ALL_ CLEAR;
FILENAME fileref | _ALL_ LIST;

fileref

is a symbolic name for an external file. The fileref can consist of up to eight letters, numbers, national characters ($, @, #), and underscores (_). The first character must be either a letter, a national character, or an underscore.

device-type

specifies a device type for the file. It can be one of the following:

CATALOG

references a SAS catalog as a flat file. The external file is a valid two-, three-, or four- part SAS catalog name followed by any catalog options needed. Refer to SAS Language Reference: Dictionary for a description of catalog options.

DISK

sends the input or output to a disk drive.

DUMMY

specifies a null input or output device. This value is especially useful in testing situations. Any output that would normally be sent to the external file is discarded.

FTP

reads or writes to a file from any machine on a network that is running an FTP server. The external file is the pathname of the external file on the remote machine followed by FTP options. Only one member of a z/OS PDS can be written to at a time. If you need to write to multiple members at the same time, a z/OS PDSE or a UNIX System Services directory should be used. For more information about using FTP with the FILENAME statement, see Assigning Filerefs to Files on Other Systems (FTP, SFTP, and SOCKET Access Types).

HFS

specifies a UNIX System Services file.

MVS

specifies an MVS data set.

NOMVSTRANS

suppresses the EBCDIC to ASCII translation that is internal to the Socket access method.

Restriction: The NOMVSTRANS option is supported only for the SBCS (Single-Byte Character Set) version of SAS.
PIPE

specifies that SAS open a UNIX System Services pipeline for execution of UNIX System Services commands that are issued within the statement.

PLOTTER

sends the output to the default system plotter.

PRINTER

sends the output to the default system printer.

SOCKET

reads and writes information over a TCP/IP socket. The external file depends on whether the SAS application is a server application or a client application. In a client application, the external file is the name or IP address of the host and the TCP/IP port number to connect to followed by any TCP/IP options. In server applications, it is the port number to create for listening, followed by the SERVER keyword, and then any TCP/IP options. See SAS Language Reference: Dictionary for more information.

Note:   The maximum number of directory or PDS members that you can have open at the same time is limited by the number of sockets that your FTP server can have open at one time. This limitation is restricted by the maximum number of connections created when the FTP server is installed.

You might want to limit the number of sockets you have open at the same time to prevent potential degradation of your system's performance. The number of sockets that are open at the same time is proportional to the number of directory or PDS members open at the same time. When the job you are running opens the maximum number of sockets that can be open at the same time, the results of the job can become unpredictable.  [cautionend]

TAPE

sends the input or output to a tape drive.

TEMP

allocates a temporary data set.

TERMINAL

reads the input from your terminal, or sends the output to your terminal.

UPRINTER

associates the fileref with the Universal Printing device. Any output generated to a fileref that is defined for this device type is formatted and sent to the default device that has been set up interactively through the Printer Setup dialog box. By default on z/OS, output is sent to a data set called <prefix>.sasprt.ps, where <prefix> is the value of the SYSPREF= system option. For more information about Universal Printing, see Universal Printing and the SAS Language Reference: Dictionary.

URL

enables you to access remote files using the URL of the file. The external file is the name of the file that you want to read from or write to on a URL server. The URL must be in one of the following forms:

http://hostname/file
http://hostname:portno/file
Refer to SAS Language Reference: Dictionary for more information.

You can specify device-type between the fileref and the file specification in the FILENAME statement. If you do not specify a device type value for a new file, SAS uses the current value of the SAS system option FILEDEV=.

'physical-filename' or ('physical-filename-1'... 'physical-filename-n')

identifies an external file or a concatenation of external files. Enclose physical-filename in quotation marks. In a concatenation, enclose the entire group of concatenated file specifications in parentheses.

The physical file can be a sequential data set, a member of a partitioned data set (PDS), a member of an extended partitioned data set (PDSE), or a file in UNIX System Services (USS). For information about files in USS directories, see Accessing a Particular File in a UNIX System Services Directory. 'physical-filename' can be specified as

  • a fully qualified data set name. For example:

    'myid.raw.datax'
  • a fully qualified data set name with a member in parentheses. For example:

    'sas.raw.data(mem1)'
  • a partially qualified data set name with a period preceding it. For example:

    '.raw.data'
  • a partially qualified data set name with a period preceding it and a member name in parentheses. For example:

    '.raw.data(mem1)'
  • for PDS members, a fully or partially qualified data set name with a wildcard name in parentheses. For example:

    '.raw.data(mem*)'
    '.raw.data(*mem1)'
    '.raw.data(*)'
  • a temporary data set name. For example:

    '&mytemp'
  • a UNIX System Services file. For example:

    '/u/userid/raw'
    or
    'HFS:raw'
    or
    '/u/userid/test/data/*'

    Note:   The * wildcard character indicates a concatenation of UNIX System Services files. For more information about the use of the wildcard, see Concatenating UNIX System Services Files.  [cautionend]

The value of the FILEEXT= system option can affect the way SAS interprets physical file specifications for PDS and PDSE files. See FILEEXT= System Option: z/OS for details.

The value of the FILESYSTEM= system option can also affect the way SAS interprets filenames. See FILESYSTEM= System Option: z/OS for details.

See Specifying Physical Files for more information about partially qualified data set names.

ENCODING=encoding-value

specifies the encoding to use when writing to an output file or reading from an input file. Typically, you would specify a value for ENCODING= that indicates that the file has a different encoding from the current session encoding. However, you can also specify the same encoding for the file as the encoding of the current session. You must enclose the value in quotation marks if it contains a dash.

If you specify an encoding value different from the session encoding, SAS performs the transcoding as the records are read. The default encoding is the session encoding, which is the value of the ENCODING= SAS system option.

For valid encoding values, see Encoding Values in SAS Language Elements in SAS National Language Support (NLS): Reference Guide.

host-options

are host-specific options that can be specified in the FILENAME statement. These options can be categorized into several groups. For details, see the following sections:

You can specify these options in any order following 'physical-filename'. When specifying more than one option, use a blank space to separate each option. Values for options can be specified with or without quotation marks. However, if a value contains one of the supported national characters ($, #, or @), the quotation marks are required.

_ALL_

specifies to clear or list all currently allocated filerefs.

CLEAR

specifies to deallocate the specified fileref, or to deallocate all currently allocated filerefs.

LIST

specifies to list the fileref name and physical name, or to list information about all currently allocated filerefs.


Standard File Options for the FILENAME Statement

Standard file options provide information about a data set's disposition and physical attributes. The following standard options can be used with all external files under z/OS except for files that are in the Hierarchical File System of UNIX System Services. (See Host-Specific Options for UNIX System Services Files.)

DISP=status | (status,<normal-termination-disp>,<abnormal-termination-disp>)

specifies the status of the physical file at the beginning and ending of a job, as well as what to do if the job step terminates abnormally. If you specify only status, you can omit the parentheses.

status

specifies the status of the data set at the beginning of a job. Valid values are:

NEW

creates a new data set.

OLD

does not share the existing data set.

SHR

shares the existing data set.

MOD

if the data set exists, adds new records to the end; if the data set does not exist, it creates a new data set. MOD cannot be specified for a partitioned data set.

REP

for non-PDS members, implies DISP=OLD if the data set exists and is cataloged. Otherwise, it implies DISP=NEW. For PDS members, it implies DISP=SHR if the PDS is cataloged. Otherwise, it implies DISP=NEW.

The default is SHR.

Notes:
  • You can also supply any of these values for status as a separate, individual keyword in the FILENAME statement rather than as a subparameter of the DISP= option.

  • DISP=REP is ignored if a volume is specified in the FILENAME statement.

normal-termination-disp

specifies what to do with the data set when the fileref is cleared or when the job step that was using the data set terminates normally. Valid values are:

DELETE

deletes the data set at the end of the step.

KEEP

keeps the data set.

CATLG

places the entry in the system catalog or user catalog.

UNCATLG

deletes the entry from the system catalog or user catalog.

For a new data set, the default is CATLG. For an existing data set, the default is KEEP.

abnormal-termination-disp

specifies what to do if the job step terminates abnormally. The default is to take the action that is specified or implied by normal-termination-disp. Valid values are:

DELETE

deletes the data set at the end of a job step.

KEEP

keeps the data set.

CATLG

places the entry in the system catalog or user catalog.

UNCATLG

deletes the entry from the system catalog or user catalog.

Note:   The conditional disposition for libraries and files is not honored for any abend that SAS or TSO (in the TSO environment) handles, even if you specify the ERRORABEND option or the ABORT ABEND statement.  [cautionend]

Here are some examples of the DISP parameter:

   DISP=SHR
   DISP=REP
   DISP=(NEW,CATLG)
   DISP=(OLD,UNCATLG,DELETE)
SPACE=(unit,(primary,secondary,directory),
RLSE,type,ROUND)

is the amount of disk space to be provided for a data set that is being created.

unit

can be any of the following:

TRK

allocates the space in tracks.

CYL

allocates the space in cylinders.

blklen

allocates space in blocks whose block length is blklen bytes. The system computes how many tracks are allocated.

primary

specifies how many tracks, cylinders, or blocks to allocate.

secondary

specifies how many additional tracks, cylinders, or blocks to allocate if more space is needed. The system does not allocate additional space until it is needed.

directory

specifies how many 256-byte directory blocks are needed for the directory of a partitioned data set.

RLSE

causes unused space that was allocated to an output data set to be released when the data set is closed. Unused space is released only if the data set is opened for output and if the last operation was a write operation.

type

can be any of the following:

CONTIG

specifies to use contiguous space.

MXIG

specifies to use the maximum contiguous space.

ALX

specifies to use different areas of contiguous space.

Note:   You can also specify MXIG or ALX as a separate, individual keyword in the FILENAME statement rather than as a subparameter of the SPACE= option.  [cautionend]

ROUND

specifies that the allocated space must be equal to an integral number of cylinders when the specified unit was a block length. If unit was specified as TRK or CYL, the system ignores ROUND.

Here are some examples of the SPACE parameter:

SPACE=(CYL,10) 
   or SPACE=(CYL,(10,,10),,CONTIG)
SPACE=(1024,(100,50,20),RLSE,MXIG,ROUND)

If you do not specify SPACE, its values are taken from the SAS system options FILEUNIT=, FILESPPRI=, FILESPSEC=, and FILEDIRBLK=, in the following form:

SPACE=(FILEUNIT,(FILESPPRI, FILESPSEC,FILEDIRBLK))

The default specification is SPACE=(CYL,(1,1,6)) for partitioned data sets and SPACE=(CYL,(1,1)) for sequential data sets.

See MVS JCL Reference by IBM for complete information about how to use the SPACE= option.

VOLSER=value | VOL=value | VOL=(value-1, ..., value-n)

specifies the disk or tape volume serial number or numbers. Up to 30 volume serial numbers can be specified.

If you do not specify VOLSER=, its value is taken from the SAS system option FILEVOL=.

VOLCOUNT=nnn

Where nnn is the maximum number of volumes that an output data set requires. The volume count is a decimal number from 1 through 255.

VOLSEQ=nnn

Where nnn identifies which volume of an existing multivolume data set is to be used to begin processing the data set. The volume sequence number is a decimal number from 1 to 255.

UNIT=value | UNIT=(value,n)

specifies one of several devices. The value parameter must be enclosed in quotation marks if the unit name contains characters other than alphanumeric characters. The n parameter is a number from 1 to 59 that specifies the number of devices to be allocated for the data set. If n is the letter "p" or "P", then all volumes for the data set are mounted in parallel.

If you specify a device type with UNIT=, the value overrides any device type specified in the FILENAME statement with the device-type option. Some valid values follow, but not all values are available at all sites. Ask your system administrator whether additional values are defined at your site.

  • DISK

  • DUMMY

  • PLOTTER

  • PRINTER

  • SYSDA

  • SYSALLDA

  • TAPE

  • TERMINAL

The default for UNIT= is the value of the FILEDEV= SAS system option.

A list of specific volume serial numbers in the FILENAME statement might result in the allocation of more devices to the data set than the number that is specified by n.

LABEL=(subparameter-list)

specifies the type and contents of the label of either a tape data set or a disk data set, as well as other information such as the retention period or expiration date for the data set. It is identical to the JCL LABEL= parameter. Here is a simple example:

label=(3,SL,,,EXPDT=2005/123)

This label specification indicates that the data set sequence number is 3, that it uses standard labels, and that it expires on the 123rd day of 2005. See MVS JCL Reference by IBM for complete information about how to use the LABEL= option, including which subparameters you can specify in subparameter-list.

LOCKINTERNAL

AUTO

specifies the SAS system locking that is to be used for the file or files that are identified by a FILENAME statement. AUTO does not allow two applications within the same SAS session to have simultaneous read and write access to a file. If an application has write access to a file, no other applications can have read or write access to it. If an application has read access to a file, no other application can have write access to it. Multiple applications can have simultaneous read access to a file.

SHARED

specifies the SAS system locking that is to be used for the file or files that are identified by a FILENAME statement. SHARED does not allow two applications within the same SAS session to have simultaneous write access to a file. SHARED allows one writer and multiple readers to have simultaneous access to a file.

NOMOUNT

specifies that the mount message is not issued for a volume that is not already online. The default action is to issue the mount message.

NOPROMPT

specifies that if the file that you reference in the FILENAME statement is unavailable, a dialog box is not displayed, and an error message is written to the SAS log.

REUSE

specifies that dynamic allocation reuse an existing allocation, if possible, to fulfill a new allocation request. By default, SAS requests that dynamic allocation create a unique allocation for this request. For more information about reusing an existing allocation, see the IBM document z/OS Programming: Authorized Assembler Services.

WAIT=n

controls how many minutes SAS waits if the file that you reference in the FILENAME statement is unavailable. SAS tries to reacquire the reserved data set every 15 seconds. The value n specifies a length of time in minutes.


DCB Attribute Options

The following section describes DCB options that can be used in the FILENAME statement. For additional information about DCB characteristics, see Overview of DCB Attributes.


DCB Option Descriptions

The following DCB options can be used in the FILENAME statement for all types of external files under z/OS, except for files that are stored in the directory structure of UNIX System Services. (For information about options that are available for UNIX System Services files, see Host-Specific Options for UNIX System Services Files.) These options correspond to the DCB parameters that you would specify in a JCL DD statement.

BLKSIZE=value

specifies the number of bytes in a block of records. A block is a group of records that SAS and the operating environment move as a unit when they read or write an external file. The term also refers to the space allocated for each group of records. You seldom need to calculate block size when you write an external file because SAS automatically selects the block size.

The values of the FILEBLKSIZE(device-type)= system option contain, for each model of disk that is currently available, the best block size for your installation for external, nonprint data sets on that type of disk. Some installations might provide different FILEBLKSIZE default values for batch processing than they do for interactive processing. Therefore, to see the values for the FILEBLKSIZE(device-type)= option, run the OPTIONS procedure both in a batch job and in a SAS session under TSO.

For print data sets, which by default have variable-length records, SAS uses a default block size of 264, with one record per block.

You can use the OPT value of the FILEBLKSIZE(device-type)= option to calculate the optimal block size for nonprint files. (See FILEBLKSIZE(device-type)= System Option: z/OS.) Or you can calculate the block size yourself:

  • For fixed-length records, multiply the LRECL= value by the number of records you want to put into the block.

  • For variable-length records, multiply the LRECL= value by the number of records per block and add 4 bytes.

In each case, if you are writing the data set to disk, compare the block size to the track size for the disk. A block cannot be longer than one track of the disk device on which it is stored, and the operating environment does not split a block between tracks. Make sure that the block size does not leave a large portion of the track unused. (If you are not sure, consult your computing center staff.) See Optimizing SAS I/O for information about determining the optimal block size for your data.

The maximum block size for a data set on tape is 32,760.

BUFNO=value

specifies how many memory buffers to allocate for reading and writing. If BUFNO= is not specified, the default is BUFNO=5. See Optimizing SAS I/O for information about determining the optimal BUFNO= value for your data.

DSORG=organization

can be any of the following:

DA

specifies direct access.

PO

specifies PDS, PDSE.

PS

specifies sequential.

The following values for organization refer to physical files that contain location-dependent information: DAU, POU, PSU.

You do not need to include the DSORG= value when you create an external file of type PS or PO because the operating environment identifies a partitioned data set by the presence of a directory allocation in the SPACE= parameter. When you use a FILE statement to write data, SAS identifies a PDS or PDSE by the presence of a member name in the FILE statement. If no member name is present, SAS assumes that the data set is sequential.

LRECL=value

specifies the logical record length (that is, the number of bytes in a record). SAS defaults to the size that is needed (for either print or nonprint files) when a file is opened.

Logical record length is affected by the record format. See RECFM=. When the record format is fixed (indicated by an F as part of the RECFM= value), all records have the same length, and that length is the value of the LRECL= value.

When the record format is variable (indicated by a V as part of the RECFM= value), records can have different lengths, and each record contains 4 bytes of length information in addition to its other data. Therefore, you must specify an LRECL= value that is 4 bytes longer than the longest record that you expect to write. If you do not know the length of the longest record to be put into a variable-format data set, choose a maximum value and add 4 to it to create an LRECL= value.

OPTCD=value

specifies the optional services to be performed by the operating environment. For example, specifying W requests a validity check for write operations on direct-access devices. For more information, see the appropriate IBM MVS JCL manual for your system.

Valid values are R, J, T, Z, A, Q, F, H, O, C, E, B, U, and W. You can specify more than one code by listing them with no blanks or commas between them (as with RECFM). A maximum of four characters is allowed.

RECFM=record-format

specifies the record format of the file. Valid values are

F

specifies fixed-length records, unblocked.

V

specifies variable-length records, unblocked.

FB

specifies fixed-length records, blocked.

VB

specifies variable-length records, blocked.

U

specifies undefined-length records, unblocked.

The following values can be appended to the RECFM= values:

A

specifies that the first byte of each record is an ANSI printer-control character.

M

specifies that the file is a machine control character file. SAS does not interpret machine-code control characters, nor does it create them in output files. See MVS JCL Reference by IBM for more information.

S

specifies that the file contains spanned records (when appended to V), or that the file contains standard blocks (when appended to F).

The next format stands alone; no other values can be appended:

N

indicates that the file is in binary format. The file is processed as a stream of bytes with no record boundaries, which includes the default value of LRECL. This record format is specific to SAS.


Overview of DCB Attributes

DCB attributes and options are relevant to INFILE and FILE statements as well as to the FILENAME statement. This section provides some background information about DCB characteristics.

DCB attributes are those data set characteristics that describe the organization and format of the data set records. If you do not specify these attributes, SAS uses default values. This section discusses how and under what circumstances these attributes are changed or default values are used.

The discussion focuses on the RECFM, LRECL, and BLKSIZE file attributes. For more information, see the appropriate data administration guide for your system.

Values for these attributes are kept in each of the following operating environment control blocks:

Data Set Control Block (DSCB)

is the description found in the VTOC of the disk device on which the physical file resides. They are the permanent characteristics of the data set. For tape devices, the data set label in the header of SL tapes contains this information.

Job File Control Block (JFCB)

maps a physical file on a device to a logical name (ddname). Contains information from a JCL DD statement, TSO ALLOCATE command, SAS FILENAME statement, or SAS FILENAME function. These attributes are either temporary (for the duration of the allocation) or new (to be made permanent).

Data Control Block (DCB)

describes the current state of an open data set. z/OS and its access methods (BSAM for SAS software) use the DCB to control how data is read or written. These attributes are temporary for input, but they become permanent for output.

For existing data sets, DCB attributes are almost never changed from the DSCB. These attributes can be overridden by a DD statement or TSO ALLOCATE command or by SAS FILENAME, FILE, or INFILE statement options. If a DCB option is specified in both places, the FILENAME, FILE, or INFILE option takes precedence.

When you open a data set, z/OS merges information from the DSCB (or data set label) and the JFCB to obtain the current DCB characteristics before entering the DCB open exit. SAS then merges its own information (FILENAME/FILE/INFILE statement options, data set device type, requested data set type, requested line size from LS=) and inspects the resulting DCB attributes. If the result is invalid for some reason, SAS terminates the open operation and issues an appropriate message. Attributes can be considered invalid for any of the following reasons:

For any unspecified attributes, SAS uses default values that seem to fit existing attributes. For input files, the attributes are usually complete and consistent. For output files, it is best to specify the values for RECFM and LRECL. SAS will fill in the value for BLKSIZE automatically based on the settings for the FILEBLKSIZE(device)= option.

If no permanent attributes are present (as is possible with a new data set), and if none are given by FILENAME/FILE/INFILE options, then SAS uses default values that are based on the device type and data set type. The following table summarizes these default values.

Default Attribute Values
Attribute DISK TAPE PRINT/ SYSOUT TERMINAL DUMMY
RECFM FB FB VBA V FB
LRECL 80 80 260 261 80
BLKSIZE * ** 264 265 *
* The smaller of the SAS system option FILEBLKSIZE(device-type)= value and the output device maximum, rounded down to a multiple of the LRECL.

** The smaller of the SAS system option FILEBLKSIZE(device-type)= value and 32,760, rounded down to a multiple of the LRECL.

If you specify a line size (LS=) parameter, SAS uses it to compute the LRECL and the BLKSIZE.

If you override permanent attributes on input, SAS uses the new values only for the duration of the INFILE processing; the permanent attributes of the data set are not changed. However, if you override the attributes on output, the new attributes become permanent for the data set, even if no records are physically written.


Options That Specify SMS Keywords

Several options that specify SMS (Storage Management Subsystem) keywords can be specified in the FILENAME or FILE statement when you create an external file. All of these options are ignored for existing data sets; they apply only when you are creating a data set. If you do not specify any of these options when you create an SMS data set, the system defaults are used. The default values are site-dependent; see your system administrator for details. For more information about SMS data sets, see MVS JCL Reference by IBM.

DATACLAS=data-class-name

specifies the data class for an SMS-managed data set. The name can have up to eight characters. This option applies only to new data sets; it is ignored for existing data sets. The data class is predefined and controls the DCB attributes for a data set.

The implementation of the DATACLAS= option is compatible with the SMS DATACLAS= JCL parameter. For complete information about this parameter, see MVS JCL Reference. Ask your system administrator for the data-class names that are used at your site.

DSNTYPE=BASIC | LARGE | EXTREQ | EXTPREF | LIBRARY | PDS | NONE

specifies the type of name for the data set. The DSNTYPE values BASIC, LARGE, EXTREQ, and EXTPREF are valid for z/OS V1R7 systems and later.

BASIC

specifies that the system selects the BASIC format if the data set is sequential (DSORG=PS or PSU), or if DSORG is omitted from all sources and the data set is not VSAM. The data set cannot exceed 65535 tracks per volume.

LARGE

specifies that the system selects the LARGE format if the data set is sequential (DSORG=PS or PSU), or if DSORG is omitted from all sources and the data set is not VSAM. The data set can exceed 65535 tracks per volume.

EXTREQ

specifies that the data set is in the EXTENDED format if the data set is VSAM, sequential, or if DSORG is omitted from all sources. The assignment fails if the system cannot allocate an extended format data set.

EXTPREF

specifies that you prefer that the data set is in the EXTENDED format if the data set is VSAM, sequential, or if DSORG is omitted from all sources. If extended format is not possible, the system will select the BASIC format.

LIBRARY

specifies that the data set is a PDSE (DSORG=PO).

PDS

specifies that the data set is a PDS (DSORG=PO).

NONE

specifies that the default DSNTYPE of the system should be used when a new sequential file is allocated.

The FILESEQDSNTYPE system option provides a default value for creation of sequential files when no DSNTYPE parameter is specified. For more information about this option see:
LIKE=data-set-name

allocates an external file that has the same attributes as an existing file. See MVS JCL Reference for more information.

MGMTCLAS=management-class-name

specifies a management class for an SMS data set. The name can have up to eight characters. This option applies only to new data sets; it is ignored for existing data sets. The management class is predefined and controls how your data set is managed, such as how often it is backed up and how it is migrated.

The implementation of the MGMTCLAS= option is compatible with the SMS MGMTCLAS= JCL parameter. For complete information about this parameter, see MVS JCL Reference. Ask your system administrator for the management class names that are used at your site.

RECORG=record-organization

specifies the organization of records in a new VSAM data set. Use this option only if SMS is active. Valid values are

KS

specifies a VSAM key-sequenced data set.

ES

specifies a VSAM entry-sequenced data set.

RR

specifies a VSAM relative-record data set.

LS

specifies a VSAM linear-space data set.

STORCLAS=storage-class-name

specifies a storage class for an SMS data set. The name can have up to eight characters. This option applies only to new data sets; it is ignored for existing data sets. The storage class is predefined and controls which device your SMS data set is stored on, such as disk or tape.

The implementation of the STORCLAS= option is compatible with the SMS STORCLAS= JCL parameter. For more information about this parameter, refer to MVS JCL Reference. See your system administrator for storage class names at your site.


SYSOUT Data Set Options for the FILENAME Statement

The following options apply to data sets that are sent to a system output device (usually a printer). The default value is usually the value that was specified by your site at installation. See Writing to Print Data Sets, as well as your IBM JCL reference, for more information about print data sets.

ALIGN

tells the operator to check the alignment of the printer forms before printing the data set.

BURST

tells the operator that the printed output goes to a burster-trimmer-stacker machine, to be burst into separate sheets.

CHAR1=

specifies a one- to four-character name for character-arrangement table #1 (used in conjunction with the 3800 Printing Subsystem).

CHAR2=

specifies a one- to four-character name for character-arrangement table #2 (used in conjunction with the 3800 Printing Subsystem).

CHAR3=

specifies a one- to four-character name for character-arrangement table #3 (used in conjunction with the 3800 Printing Subsystem).

CHAR4=

specifies a one- to four-character name for character-arrangement table #4 (used in conjunction with the 3800 Printing Subsystem).

CLOSE

tells the operating environment to deallocate the data set when the DCB is closed.

COPIES=

specifies how many copies of the SYSOUT data set to print. The default is COPIES=1.

DEST=

specifies a destination for the SYSOUT data set. If DEST= is not defined, its value is taken from the SAS system option FILEDEST=.

FCB=

specifies the forms control buffer image that JES uses to control the printing of the SYSOUT data set.

FLASH=

specifies which forms-overlay frame to use when printing on a 3800 Printing Subsystem.

FLASHC=

specifies the number of copies on which to print the forms overlay frame.

FOLD

specifies that the print chain or print train for the universal character set is loaded in fold mode.

FORMDEF=

identifies a member that contains statements that tell the Print Services Facility from IBM how to print the SYSOUT data set on a page-mode printer. This option has no effect on SAS forms.

FORMS=

specifies the IBM form number. If FORMS= is not defined, its value is taken from the FILEFORMS= system option. This option has no effect on SAS forms.

HOLD

tells the system to hold the SYSOUT data set when it is deallocated until it is released by the system operator.

ID=

specifies the user ID for the SYSOUT destination.

MODIFY=

specifies a copy-modification module that tells JES how to print the SYSOUT data set on a 3800 Printing Subsystem.

MODIFYT=n

specifies which of the CHARn tables to use. For example, if n is 1, then the character-arrangement table that is identified by the CHAR1= option is used.

OUTDES=

specifies the output descriptor.

OUTLIM=

specifies a limit for the number of logical records in the SYSOUT data set.

PAGEDEF=

identifies a member that contains statements that tell the Print Services Facility how to format the page on a page-mode printer.

PGM=

specifies the SYSOUT program name.

PRMODE=

specifies which process mode is required for printing the SYSOUT data set.

SYSOUT=

specifies the output class for the SYSOUT data set. If SYSOUT is not defined, its value is taken from the SAS system option FILESYSOUT=.

UCS=

specifies the Universal Character Set.

UCSVER

tells the operator to visually verify that the character set image is for the correct print chain or print train. The character set image is displayed on the printer before the data set is printed.

VERIFY

tells the operator to verify that the image displayed on the printer is for the correct FCB image.


Subsystem Options for the FILENAME Statement

The following subsystem data set options are also available. For more information about subsystem data sets, see the appropriate IBM MVS JCL manual for your site.

SUBSYS=

specifies the name of the subsystem (up to four characters).

PARM1=

specifies a subsystem parameter (up to 67 characters).

PARM2=

specifies a subsystem parameter (up to 67 characters).

PARM3=

specifies a subsystem parameter (up to 67 characters).

PARM4=

specifies a subsystem parameter (up to 67 characters).

PARM5=

specifies a subsystem parameter (up to 67 characters).


Host-Specific Options for UNIX System Services Files

The following table shows which host-specific options are recognized by the FILENAME, FILE, and INFILE statements for UNIX System Services files and pipes. No other options are recognized, including such options specific to z/OS as DISP, CLOSE, and DCB. Descriptions of the options follow the table.

Host-Specific Options for UNIX System Services Files and Pipes
Option FILENAME FILE INFILE %INCLUDE
BLKSIZE= X X X X
BOM X X

BOMFILE X X

LRECL= X X X X
MOD X X

NOBOM X X

NOBOMFILE X X

OLD X X

RECFM= X X X X
TERMSTR= X X X


BLKSIZE=

specifies the number of bytes that are physically read or written in an I/O operation. The default is 8K. The maximum is 16M-1 or 16,777,215.

BOM
BOMFILE

includes a Byte Order Mark when a UNICODE-encoded file is created.

FILEDATA=BINARY | TEXT

The FILEDATA= option specifies that the file being processed is expected to contain one of the following:

BINARY

data without record separator character sequences.

TEXT

data with records terminated by the EBCDIC newline character. The EBCDIC newline character is defined at code point x'15' and is typically represented as NL or \n.

Note:   The FILEDATA= option is meant to be similar to the FILEDATA= parameter on the DD JCL statement, but is evaluated at run time by SAS. The JCL parameter is used by z/OS to set an attribute of the file when the file is created by the JCL  [cautionend]

LRECL=value

specifies the maximum number of characters in a line (unless the file has been opened with RECFM=N). The default is 255. Lines longer than value are truncated. value must be between 1 and 16,777,215, inclusive.

MOD

appends the output lines to the file. This option has no effect on a pipe.

NOBOM
NOBOMFILE

specifies that a Byte Order Mark is not included when a UNICODE-encoded file is created.

OLD

replaces the previous contents of the file. This option is the default. This option has no effect on a pipe.

RECFM=record-format

specifies the record format of the file. Valid values are

F

specifies that all lines in the file have the length specified in the LRECL= option. In output files, lines that are shorter than the LRECL= value are padded on the right with blanks.

V | D

specifies that the lines in the file are of variable length, ranging from one character to the number of characters specified by LRECL=. This option is the default.

P

specifies that the file has variable-length records and is in print format.

N

specifies that the file is in binary format. The file is treated as a byte stream. That is, line boundaries are not recognized.

TERMSTR=NONE | NL | CR | LF | CRLF | LFCR | CRNL

The TERMSTR= option specifies the type of record separator character sequences to use to terminate records in the file. TERMSTR= accepts the following parameters:

NONE

Record terminators are not used. This parameter provides the same function as FILEDATA=BINARY.

NL

The newline character (x'15') is used as the record terminator. This parameter provides the same function as FILEDATA=TEXT.

CR

The carriage return character (x'0C') is used as the record terminator.

LF

The line feed character (x'25') is used as the record terminator.

CRLF

The sequence CR followed by LF is used as the record terminator.

LFCR

The sequence LF followed by CR is used as the record terminator.

CRNL

The sequence CR followed by NL is used as the record terminator.

All of the above specifications (x'15', x'0C', and x'25') assume that the files use an ENCODING= value whose short (12 byte) name is in the form open_ed-nnnn and whose long (32 byte) name contains (OpenEdition), for example, open_ed-1047 or Western(OpenEdition). These characters are automatically transcoded to or from the file's encoding if they are required by the ENCODING= or LOCALE= options.

The last occurrence of FILEDATA= or TERMSTR= takes precedence. Specification of one or the other of these options on a FILE or INFILE statement takes precedence over the specification in a related FILENAME statement.

The full precedence order is as follows:

  1. Specification of FILEDATA= or TERMSTR= on a FILE or INFILE statement.

  2. Specification of FILEDATA= or TERMSTR= on a FILENAME statement.

  3. Specification of FILEDATA= on a DD JCL statement when the file was created by that DD statement

  4. Implied by the RECFM= option in effect for the file.

The RECFM= option in the FILENAME, FILE, and INFILE statement can imply the value assumed for the termination sequence. This implication is always overridden by the presence of a TERMSTR= or FILEDATA= option for the file. Here are the default values:

RECFM=V|D

TERMSTR=NL is implied. (This option is the default.)

RECFM=F

TERMSTR=NONE is implied.

RECFM=P

TERMSTR=NL implied, along with other formatting control characters.

RECFM=N

TERMSTR=NONE is implied.

Note:   The FILEDATA= parameter on the DD JCL statement is used only by z/OS when the file is being created by that JCL statement. For existing files, the FILEDATA= parameter is ignored by z/OS, and SAS is informed of its value at file creation time. Therefore, SAS cannot detect a change in the JCL. However, SAS will honor the values of FILEDATA= or TERMSTR= that are specified in the FILENAME, INFILE, or FILE statements when you replace an existing file or read a file.  [cautionend]

CAUTION:
The combination of RECFM=, FILEDATA=, and TERMSTR= provides much flexibility for reading and writing many different file formats. It is possible to use these options in a way that can produce a file that might be difficult to process in the future. For example, a PRINT file can be created without record terminators, but this file would look strange when printed on a printer or viewed in an editor.   [cautionend]
For more information about these options, see Accessing UNIX System Services Files, Writing to External Files, and Using the FILE Statement to Specify Data Set Attributes.

See Also

Previous Page | Next Page | Top of Page