Previous Page | Next Page

Routing the SAS Log and SAS Procedure Output

Routing Output in Noninteractive Mode


Default Output Destination in Noninteractive Mode

In noninteractive mode, the default destination for the log is the disk file program-name.LOG, where program-name is the name of the file that contains the submitted SAS statements. The default destination for the procedure output is a disk file named program-name.LIS. For example, if you run your SAS program in noninteractive mode using the following command, the SAS log is automatically directed to a file named PROGNAME.LOG and the procedure output is written to a file named PROGNAME.LIS:

$ SAS PROGNAME

Both files are written in the default directory.


Routing the Log to a Monitor

To send the SAS log to a monitor in noninteractive mode, choose from the following methods:

$ SAS/LOG=SYS$OUTPUT program-name

This SAS command sends the SAS log to your monitor instead of the default destination (program-name.LOG file).

$ SAS/ALTLOG=SYS$OUTPUT program-name

This SAS command sends a copy of the SAS log to your monitor and to the default destination (program-name.LOG file).

PROC PRINTTO LOG=fileref;

This procedure statement sends the SAS log to your monitor during a noninteractive job. You must have defined fileref in a FILENAME statement or function with the TERMINAL device-type keyword. For more information, see PRINTTO Procedure: OpenVMS and Device-Type Keywords in the FILENAME statement.


Routing the Log to a Printer

To send the SAS log to a printer in noninteractive mode, choose from the following methods:

$ SAS/LOG=SYS$PRINT program-name

This SAS command sends the SAS log to the SYS$PRINT printer queue instead of the default destination (program-name.LOG file). If you want to send the log to a different printer, you must redefine the SYS$PRINT logical name.

$ SAS/ALTLOG=SYS$PRINT program-name

This SAS command sends a copy of the SAS log to the SYS$PRINT printer queue and to the default destination (program-name.LOG file). If you want to send the log to a different printer, you must redefine the SYS$PRINT logical name.

PROC PRINTTO LOG=fileref;

This procedure statement sends the SAS log to a printer during a noninteractive job. You must have defined fileref in a FILENAME statement or function with the PRINTER device-type keyword. For more information, see PRINTTO Procedure: OpenVMS and Device-Type Keywords in the FILENAME statement.

You can also use the DCL PRINT command to send the program-name.LOG file to the printer after a noninteractive job finishes.


Routing the Log to a Disk File

To send the SAS log to a disk file in noninteractive mode, choose one of the following methods:

$ SAS/LOG=file-specification program-name

This SAS command sends the SAS log to the file file-specification instead of the default destination (program-name.LOG file). The following is an example of this command:

$ SAS/LOG=MYLOG.LOG PROG1
$ SAS/ALTLOG=file-specification program-name

This SAS command sends a copy of the SAS log to the disk file file-specification and to the default destination (program-name.LOG file). The following is an example of this command:

$ SAS/ALTLOG=MYLOG.LOG PROG1
PROC PRINTTO LOG=file-specification;

This procedure statement sends any following SAS log entries to the disk file associated with file-specification during a noninteractive job. The value for file-specification can be any valid external file specification, as discussed in Identifying External Files to SAS.


Routing Procedure Output to a Monitor

To send the procedure output to a monitor in noninteractive mode, choose from the following methods:

$ SAS/PRINT=SYS$OUTPUT program-name

This SAS command sends the procedure output to your monitor instead of the default destination (program-name.LIS file).

$ SAS/ALTPRINT=SYS$OUTPUT program-name

This SAS command sends a copy of the procedure output to your monitor and to the default destination (program-name.LIS file).

PROC PRINTTO PRINT=fileref;

This procedure statement sends the procedure output to your monitor during a noninteractive job. You must have defined fileref in a FILENAME statement or function with the TERMINAL device-type keyword. For more information, see PRINTTO Procedure: OpenVMS and Device-Type Keywords in the FILENAME statement.


Routing Procedure Output to a Printer

To send the procedure output to a printer in noninteractive mode, choose from the following methods:

$ SAS/PRINT=SYS$PRINT program-name

This SAS command sends the procedure output to the SYS$PRINT printer queue instead of the default destination (program-name.LIS file). If you want to send the procedure output to a different printer, you must redefine the SYS$PRINT logical name.

$ SAS/ALTPRINT=SYS$PRINT program-name

This SAS command sends a copy of the procedure output to the SYS$PRINT printer queue and to the default destination (program-name.LIS file). If you want to send the procedure output to a different printer, you must redefine the SYS$PRINT logical name.

PROC PRINTTO PRINT=fileref;

This procedure statement sends the procedure output to a printer during a noninteractive job. You must have defined fileref in a FILENAME statement or function with the PRINTER device-type keyword. For more information, see PRINTTO Procedure: OpenVMS and Device-Type Keywords in the FILENAME statement.

You can also use the DCL PRINT command to send the program-name.LIS file to the printer after a noninteractive job finishes.


Routing Procedure Output to a Disk File

To send the procedure output to a disk file in noninteractive mode, choose one of the following methods:

$ SAS/PRINT=file-specification program-name

This SAS command sends the procedure output to the disk file file-specification instead of the default destination (program-name.LIS file). The following is an example of this command:

$ SAS/PRINT=MYPROG.LIS PROG1
$ SAS/ALTPRINT=file-specification program-name

This SAS command sends a copy of the procedure output to the file file-specification and to the default destination (program-name.LIS file). The following is an example of this command:

$ SAS/ALTPRINT=MYPROG.LIS PROG1
PROC PRINTTO PRINT=file-specification;

This procedure statement sends any following procedure output to the disk file associated with file-specification during a noninteractive job. The value for file-specification can be any valid external file specification discussed in Identifying External Files to SAS.

Previous Page | Next Page | Top of Page