Chapter Contents

Previous

Next
SAS Companion for the OpenVMS Operating Environment

Reading and Writing SAS System Print Files

The following sections describe the default print-file format under OpenVMS and how print files can be created using command files.


Default Print File Format

FORTRAN is the default file format for SAS print files. You can change the default for the entire session or for specific files by using the CC= system option. This option can be used in the FILENAME statement, in the FILENAME function, or as a system option.

Note:   The FILE command generates a nonprint file, whereas the PRINT command generates a print file.  [cautionend]

To specify the carriage-control format, use either the CC= external I/O statement option (see Host-Specific External I/O Statement Options in the FILENAME statement) or the CC= system option (see CC=). You can also use the FILECC system option to control how SAS treats the data in column 1 of a print file (see FILECC).

When you write to a print file with FORTRAN carriage control, SAS shifts all column specifications in the PUT statement one column to the right to accommodate the carriage-control characters in column 1.

A nonprint file that is written by the SAS System contains neither carriage-control characters nor titles. Whether you create a print or nonprint file, the SAS System provides default values for some characteristics of the file; these defaults are adequate in most cases. Default File Attributes for SAS Print and Nonprint Files lists the defaults for print and nonprint files.

Default File Attributes for SAS Print and Nonprint Files
Attribute Print File
(Batch)
Print File
(Interactive)
Nonprint File
Maximum record size 132 80 32,767
RECFM= V V V
CC= FORTRAN FORTRAN CR


Print Files Created by Command Files

When you run a SAS program from a command-procedure file with the DCL command qualifier OUT= and also specify the SAS system option ALTLOG=SYS$OUTPUT, you must also use the CC= system option to correctly set the print-file format.

The default print-file format is FORTRAN. However, the DCL command qualifier OUT= creates a VFC format file. Unless you also specify either CC=FORTRAN or CC=CR in your SAS command, your output or listing will lack the first column of data.

The following is an example that generates the correct results:

These commands send the log to the SYS$OUTPUT destination, and a copy of the log (including the first column of data) is stored in the file OUT.LOG.

For more information about command-procedure files, see Invoking SAS from a Command Procedure File, Command Procedures, and OpenVMS User's Manual.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.