Chapter Contents |
Previous |
Next |
SAS Companion for the OS/390 Environment |
Specify the system options in any of the following ways:
See Specifying or Changing System Option Settings for more information about specifying SAS system options.
Directing Output to an External File at SAS Invocation |
When you invoke SAS, use the LOG= and PRINT= options to specify the DDnames or physical file names of the output data sets. See LOG= and PRINT= for option syntax and other host-specific details.
SAS automatically allocates a file when a system option is specified with an physical file name. The following example illustrates a SAS invocation in noninteractive mode using the SAS CLIST with internal allocation of output files.
sas options ('log=myid.output.logdata print=myid.output.ptrdata') input('''myid.sas.program''')
This example illustrates the same SAS invocation using external allocation.
alloc fi(logout) da('myid.output.logdata') old alloc fi(printout) da('myid.output.prtdata') old sas options('log=logout print=printout') input('''myid.sas.program''')
This example illustrates a SAS invocation in batch mode, using a JCL EXEC statement and internal allocation of output files.
//SASSTEP EXEC SAS, // OPTIONS='LOG=<file> PRINT=<file> ALTLOG=<file>'
This example illustrates the same SAS invocation with external allocation.
//SASSTEP EXEC SAS, // OPTIONS='LOG=LOGOUT PRINT=PRINTOUT' //LOGOUT DD DSN=MYID.OUTPUT.LOGDATA,DISP=OLD //PRINTOUT DD DSN=MYID.OUTPUT.PRTDATA,DISP=OLD //SYSIN DD DSN=MYID.SAS.PROGRAM,DISP=SHR
The LOG= and PRINT= system options are normally used in batch, noninteractive, and interactive line modes. These options have no effect in the windowing environment, which will continue to display SAS log and procedure output data in the LOG and OUTPUT windows. To capture and print data in the LOG and OUTPUT windows, use the ALTLOG= and ALTPRINT= options, as described in the next section.
See ALTLOG= and ALTPRINT= for option syntax and other host-specific details.
Copying Output to an External File |
When you invoke SAS, use the ALTLOG= and ALTPRINT= options as shown to specify the DDnames or physical file names of the allocated data sets:
sas options('altprint=myid.output.prtdata altlog=myid.output.logdata')
See the previous section for complete examples of SAS invocations in various modes.
Directing Output to External Files Using the Configuration File |
This example illustrates how to direct output to external files using the SAS configuration file.
log=myid.output.logdata * logout DDname must be allocated log=logout print=myid.output.prtdata * printout DDname must be allocated print=printout altlog=myid.output.altlog * altlogx DDname must be allocated altlog=altlogx
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.