Chapter Contents |
Previous |
Next |
SAS Companion for the CMS Environment |
The following section explains which values are used if you specify file characteristics for the same file in multiple places.
Order of Precedence for Input |
Order of Precedence for Output |
If you use a fileref to reference a file for output, any values that you specify for file characteristics in the FILE statement take precedence over any that you have specified in a FILENAME statement or in a CMS FILEDEF command. If you do not specify any values for file characteristics when you are appending to an existing file, the values for the existing file are used. If you do not specify any values for file characteristics when you are writing to a new file, the defaults are used. Default file characteristics are shown in FILENAME.
Options |
The following file characteristics can be specified in the options argument in a FILE, FILENAME, or INFILE statement. All options use a keyword=value format, and multiple options are separated by blank spaces. For the FILE statement, note that options cannot be specified if you use FILE LOG, FILE PRINT, or FILE PIPE. For the FILENAME statement, note that if file characteristics are given in a statement that specifies several files to be concatenated, then all files must have the same attributes.
Records do not have to be blocked. However, because disk or tape activity is reduced when records are blocked, it is more efficient to use blocks. Blocking records is different when you use CMS Native I/O Services than it is when you use OS/390 Simulation Services.
For CMS Native I/O Services, the following apply:
For OS/390 Simulated I/O Services, the following apply:
MOD | specifies that output lines are to be written after any existing lines in the file. |
OLD | specifies that any output lines are to be written at the beginning of the file. This is the default. For CMS, this option is identical to the NEW option. |
NEW | specifies that any output lines are to be written at the beginning of the file. For CMS, this option is identical to the OLD option. |
If SL, NL, or BLP is specified, then an additional label value n can be specified after the SL, NL, or BLP. The value of n indicates the file position in a multifile volume. The default value is 1.
You can choose one of the following record formats:
F | specifies fixed-length records, unblocked. |
FB | specifies fixed-length records, blocked. |
V | specifies variable-length records, unblocked. |
VB | specifies variable-length records, blocked. |
U | specifies undefined record format. For CMS disk files, this is the same as V. |
You can use the following values in any of the previously listed formats except U.
A | specifies that the first byte of each record is an ANSI printer control character and that the file is to be handled as a print file. |
S | specifies that the file contains spanned records (V), or that the file contains standard blocks (F). FS, FBS, VS, and VBS files must be assigned with a CMS FILEDEF command. |
See the FILEDEF command entry in VM/ESA CMS Command Reference for more information about these options.
SAS does not interfere with FILEDEF options that are already specified. Therefore, TAPE options that are specified in the FILE, FILENAME, or INFILE statements that conflict with an existing FILEDEF to TAPE are ignored. See Working with SAS Files on Tape for more information.
If a variable-length file is opened for update (possibly in the DATA step) and if the replacement line is not the same length as the existing line, then the standard CMS file system action truncates the file at that point. No message is given. The next READ to that file returns an EOF message.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.