Chapter Contents

Previous

Next
SAS Companion for the OS/390 Environment

SAS System Files

Configuration files (described in Configuration Files) and SASUSER files (described in SASUSER Library) are only two of several SAS system files that are automatically identified to your session by either the SAS CLIST (under TSO) or the SAS cataloged procedure (in batch). This section describes several other SAS system files that are significant to SAS users under OS/390.

For brief descriptions of all the SAS system files that are frequently used by the SAS CLIST or by the SAS cataloged procedure, see SAS System Files.


WORK Library

By default, the WORK library is a temporary SAS data library that contains temporary SAS data sets, utility files (created by some SAS procedures, such as PROC SORT and PROC TABULATE), your user profile, and other items that SAS uses in processing your current job. Anytime you assign a one-level name to a SAS data set, the data set is stored in the WORK library by default.

The WORK library is automatically defined by the SAS System at the beginning of your SAS job or session, unless you invoke SAS under TSO and specify the GO operand. By default, the entire WORK library is deleted at the end of each SAS job or session.

The WORK library must exist on a disk device in Version 8 format so that it can be accessed by the V8 engine. (See Using V8 Engines for information about the V8 engine.) Under OS/390, the physical file that is associated with the DDname WORK is allocated by the SAS CLIST or by the SAS cataloged procedure.

Space is the aspect of the WORK library that is most likely to require your consideration. Both the SAS cataloged procedure and the SAS CLIST include parameters that enable you to specify how much space to allocate to the work library. In the cataloged procedure and CLIST that are supplied by SAS Institute, the space allocation for the WORK library is as follows:

SPACE=(6144,(500,200))

That is, the space is allocated in 6144-byte blocks, with a primary allocation of 500 blocks and a secondary allocation of 200 blocks. (Your installation may use different values; see the JCL from one of your SAS jobs to get a listing of the cataloged procedure that your SAS jobs use.) This space is enough for many SAS jobs. However, if you have many large temporary SAS data sets, or if you use a procedure that has many large utility files (for example, a PROC FREQ step with a complex TABLES statement that you run against a large SAS data set), you may run out of space in the WORK library. If you run out of space in batch mode, your PROC or DATA step terminates prematurely and issues a message similar to the one shown in Insufficient WORK Space Message. In an interactive session, a dialog window asks you to specify what action to take.

Insufficient WORK Space Message
   ERROR: Insufficient space in file WORK.DATASET.DATA.
   NOTE: The SAS System stopped processing this step because of errors.
   NOTE: SAS set option OBS=0 and will continue to check statements.
         This may cause NOTE: No observations in data set.
   WARNING: The data set WORK.DATASET may be incomplete.  When this step
            was stopped there were 22360 observations and 4 variables.
   ERROR: Errors printed on page 1.

Here are three possible solutions to this problem:

You can also combine these methods.

Increasing the Size of the WORK Library


Batch Mode Method

To increase the size of the WORK library in a batch job, include the WORK parameter in the EXEC statement in your JCL. The following SAS job allocates 1000 blocks of primary and 400 blocks of secondary space--twice as much as the default WORK allocations:

//HUGE JOB accounting-information
// EXEC SAS,WORK='1000,400'
//SYSIN DD *
SAS statements

/*
//

Interactive Mode Method

If you invoke SAS interactively, then include the WORK operand in the SAS CLIST command, as in the following example:

sas work('1000,400')

Deleting Temporary SAS Data Sets

Under OS/390, temporary SAS data set means a data set that is stored in a temporary SAS data library. That is, you cannot designate the data set itself as temporary, but the data set takes on the attribute of the library in which it is stored.

One simple way to conserve space in the WORK library is to delete each temporary SAS data set with a PROC DATASETS step after you no longer need it. However, there are two problems with this method.

An alternative to deleting the temporary SAS data sets is to direct them to a different SAS data library, as described in the next section.

Directing Temporary SAS Data Sets to the USER Library

You can use the USER= system option to store temporary data sets in the USER library rather than in the WORK library. You can make the USER library as large as you need it to be.

Note:   Utility data sets that are created by the SAS procedures continue to be stored in the WORK library. However, any data sets that have one-level names and that are created by your SAS programs will be stored in the USER library.  [cautionend]

You can use a temporary or permanent physical file for the library, and you can put the library either on disk or on tape. The physical file can be either a Version 8, 7, or 6 SAS data library. If it is a Version 6 SAS data library, then it provides support for data sets but not for catalogs. Differences between the WORK and USER Libraries summarizes differences between the WORK and USER libraries.

Differences between the WORK and USER Libraries
Library Type of O.E. Data Set Storage Medium Format
WORK temporary disk V8
USER temporary or permanent disk or tape V8, V7, or V6

The following example illustrates the use of the USER= system option. The numbered lines of code are explained below.

   filename giant 'company.survey.tvdata';
   libname result 'my.tv.sasdata';
[1] libname temp '&tvtemp' space=(cyl,(6,2));
[2] options user=temp;
[3] data totalusa;
     infile giant;
     input home_id region income viewers cable;
     if home_id=. then delete;
   run;

[4] proc freq;
      tables region*income*viewers*cable
[5]       / noprint out=result.freqdata;
   run;
  1. The LIBNAME statement associates the libref TEMP with the temporary physical file &TVTEMP.

  2. In the OPTIONS statement, the USER= system option designates the TEMP libref as the temporary SAS data library. Any data sets that have one-level names and that are created by your SAS program will be stored in this library.

  3. A one-level name is used in the DATA statement. When the DATA step is processed, the SAS data set TEMP.TOTALUSA is created.

  4. Because the large TOTALUSA data set was directed to the TEMP library, there is more space available in the WORK library for the utility files that the FREQ procedure requires.

  5. The SAS data set FREQDATA contains the results of the FREQ procedure. A two-level name is used to store FREQDATA in the permanent SAS data library MY.TV.SASDATA.


SAS Log File

The SAS log file is a temporary physical file that has a DDname of SASLOG in both the SAS cataloged procedure and the SAS CLIST. In batch mode, the SAS cataloged procedure assigns default data control block (DCB) characteristics to this file as follows:

BLKSIZE=141
LRECL=137
RECFM=VBA

Under TSO, either interactively or noninteractively, the SASLOG file is routed to the terminal by default. In the windowing environment, the SAS log is directed to the LOG window.

See Types of SAS Output for more information about the SAS log and about how to route output in a batch job.

Changing the Contents of the SAS Log

The particular information that appears in the SAS log depends on the settings of several SAS system options. See Collecting Performance Statistics for more information.

In addition, the following portable system options affect the contents of the SAS log:

CPUID
controls whether CPU information is printed at the beginning of the SAS log.

DETAILS
specifies whether to include additional information when files are listed in a SAS data library.

ECHOAUTO
controls whether the SAS source statements in the autoexec file are written (echoed) to the SAS log.

MLOGIC
controls whether macro trace information is written to the SAS log when macros are executed.

MPRINT
controls whether SAS statements that are generated by macros are displayed.

MSGLEVEL
controls the level of messages that are displayed.

NEWS=
specifies an external file that contains messages to be written to the SAS log when the SAS System is initialized. Typically, the file contains information such as news items about the system.

NOTES
controls whether NOTES are printed in the log. NOTES is the default setting for all methods of running SAS. Do not specify NONOTES unless your SAS program is completely debugged.

OPLIST
specifies whether options given at SAS invocation are written to the SAS log.

PAGESIZE=
specifies the number of lines that compose a page of SAS output.

PRINTMSGLIST
controls whether extended lists of messages are printed.

SOURCE
controls whether SAS source statements are written to the log. NOSOURCE is the default setting for SAS interactive line mode; otherwise, SOURCE is the default.

SOURCE2
controls whether secondary source statements from files that are included by %INCLUDE statements are written to the SAS log.

SYMBOLGEN
controls whether the macro processor displays the results of resolving macro references.


Changing the Appearance of the SAS Log

The following portable system options are used to change the appearance of the SAS log:

DATE
controls whether the date and time, based on when the SAS job or session began, are written at the top of each page of the SAS log and of any print file that the SAS System creates. Use NODATE to suppress printing of the date and time.

LINESIZE=
specifies the line size (printer line width) for the SAS log and the SAS procedure output file. LS= is an alias for this option. LINESIZE= values can range from 64 through 256.

NUMBER
controls whether the log pages are numbered. NUMBER is the default. Use the NONUMBER option to suppress page numbers.

OVP
controls whether lines in SAS output are overprinted.


SAS Procedure Output File

Whenever a SAS program executes a PROC step that produces printed output, SAS sends the output to the procedure output file. Under TSO, either interactively or noninteractively, the procedure output file is routed to the terminal by default. In the windowing environment, output is directed to the OUTPUT window.

In batch mode, the SAS procedure output file is identified in the cataloged procedure by the DDname SASLIST. Unless you specify otherwise, SAS writes most procedure output to this file. (A few procedures, such as the OPTIONS procedure, route output directly to the SAS log by default.) PUT statement output may also be directed to this file by a FILE statement that uses the fileref PRINT. (PRINT is a special fileref that can be specified in the FILE statement.)

The following DCB characteristics of the procedure output file are controlled by the cataloged procedure, typically with the following values:

BLKSIZE=264
LRECL=260
RECFM=VBA

The SAS procedure output file is often called the print file; however, note that any data set that contains carriage-control information (identified by a trailing A as part of the RECFM= specification) can be called a print file.

Changing the Appearance of Procedure Output

The following portable system options are used to change the appearance of procedure output:

CENTER
controls whether the printed results are centered or left aligned on the procedure output page. CENTER is the default; NOCENTER specifies left alignment.

DATE
controls whether the date and time, based on when the SAS job or session began, are written at the top of each page of the SAS log and of any print file that the SAS System creates. Use NODATE to suppress printing of the date and time.

LINESIZE=
specifies the line size (printer line width) for the SAS log and the SAS procedure output file. LS= is an alias for this option. LINESIZE= values can range from 64 through 256.

NUMBER
controls whether the page number is printed on the first title line of each SAS printed output page. NUMBER is the default. Use the NONUMBER option to suppress page numbers.

PAGENO=
specifies a beginning page number for the next page of output that the SAS System produces.

PAGESIZE=
specifies how many lines to print on each page of SAS output. PS= is an alias for this option. In the windowing environment or interactive line mode session, the PAGESIZE= option defaults to the terminal screen size, if this information is available from the operating environment. PAGESIZE= values can range from 15 through 500.


Console Log File

The SAS console log file is a physical file that is automatically allocated at the start of SAS initialization. The name of the file is specified by the CONSOLELOG= system option. The console log file records log messages generated when the regular SAS log is either unavailable or is not yet allocated. You can control the appearance of the console log file with the LINESIZE= system option only. The SAS CLIST and catalogued procedures allocate this file using the DDname SASCLOG.


Parmcards File

The parmcards file is a temporary physical file that is identified by the DDname SASPARM. It is created automatically by the SAS cataloged procedure and by the SAS CLIST. SAS uses the parmcards file for internal processing. Lines that follow a PARMCARDS statement in a PROC step are first written to the parmcards file; then they are read into the procedure. The PARMCARDS statement is used in the BMDP and EXPLODE procedures.


Summary Table of SAS System Files

SAS System Files lists all of the SAS system files that are frequently used in the SAS CLIST or in the SAS cataloged procedure. In the CLIST and cataloged procedure, logical names are associated with physical files. The logical names listed in SAS System Files are those that are used by the standard SAS CLIST or cataloged procedure. Your installation may have changed these names.

The system option column of SAS System Files lists the SAS system options that you can pass into the SAS CLIST (using the OPTIONS operand) or into the SAS cataloged procedure (using the OPTIONS parameter) when you invoke SAS. You can use these system options to change the defaults that were established by the CLIST or by the cataloged procedure. (See Specifying or Changing System Option Settings.)

SAS System Files
Default Logical Name Purpose System Option CLIST Operands Type of O.E. Data Set
CONFIG system configuration file CONFIG= DDname
DDCONFIG(DDname) sequential data set or PDS member; must be FB, LRECL=80
Description: contains system options that are processed automatically when you invoke SAS. The system configuration file is usually maintained by your data center.
CONFIG user configuration file CONFIG= DDname
CONFIG(dsn)

DDCONFIG(DDname)

sequential data set or PDS member; must be FB, LRECL=80
Description: also contains system options that are processed automatically when you invoke SAS. Your user configuration file is concatenated to the system configuration file.
LIBRARY format library n/a n/a SAS data library
Description: contains formats and informats.
SAMPSIO sample SAS data library n/a n/a SAS data library
Description: is the SAS data library that is accessed by SAS programs in the sample library provided by SAS Institute.
SASnnnnn
command processor file n/a n/a sequential data set or PDS member
Description: is used by the SASCP command in the SAS CLIST.
SASAUTOS system autocall library n/a MAUTS(dsn) PDS
Description: contains source for SAS macros that were written by your data center or provided by SAS Institute.
SASAUTOS user autocall library SASAUTOS= specification* SASAUTOS(dsn) DDSASAUT(DDname) PDS
Description: contains a user-defined autocall library to which the system autocall library is concatenated.
SASCLOG console log CONSOLELOG=DDname n/a sequential data set or PDS member
Description: SAS console log file.
SASEXEC autoexec file AUTOEXEC= DDname
AUTOEXEC(dsn) DDAUTOEX(DDname) sequential data set or PDS member
Description: contains statements that are executed automatically when you invoke SAS.
SASHELP HELP library SASHELP= DDname
SASHELP(dsn) DDSASHLP(DDname) SAS data library
Description: contains system default catalogs and Help system information.
SASLIB format library (V5) SASLIB= DDname
n/a load library
Description: a load library that contains user-written procedures and functions or Version 5 formats and informats. It is searched before the SAS System load library.
SASLIST procedure output file PRINT= DDname
PRINT(dsn) DDPRINT(DDname) sequential data set or PDS member
Description: contains SAS procedure output.
SASLOG log file LOG= DDname
LOG(dsn) DDLOG(DDname) sequential data set or PDS member
Description: SAS log file.
SASMSG system message file SASMSG= DDname
SASMSG(dsn) DDSASMSG(DDname) PDS
Description: contains SAS system messages.
SASPARM parmcards file PARMCARD= DDname
PARMCARD(size) DDPARMCD(DDname) sequential data set or PDS member
Description: a temporary data set that is used by some procedures. The PARMCARD= system option assigns a DDname to the parmcards file; the PARMCARD CLIST operand specifies the file size. You can use the DDPARMCD operand to specify an alternate name for the parmcards file via the CLIST.
SASSNAP SNAP dump file n/a n/a sequential data set or PDS member
Description: SNAP output from dump taken during abend recovery.
SASSWKnn
sort work files DYNALLOC SORTWKDD= SORTWKNO= n/a sequential
Description: temporary files that are used by the host sort utility when sorting large amounts of data.
SASUSER SASUSER library SASUSER= DDname
SASUSER(dsn) DDSASUSR(DDname) SAS data library
Description: contains the user profile catalog and other personal catalogs.
STEPLIB STEPLIB library n/a LOAD(dsn) SASLOAD(dsn) load library
Description: a load library that contains SAS procedure and user-written load modules. (Allocate with a STEPLIB DD statement in a batch job.)
SYSIN primary input file SYSIN= DDname
INPUT(dsn) DDSYSIN(DDname) sequential data set or PDS member
Description: contains SAS statements. The primary input file can be specified with the INPUT operand under TSO, or allocated with a DD statement in a batch job.
USER USER library USER= DDname | dsn
n/a SAS data library
Description: specifies a SAS data library in which to store SAS data sets that have one-level names (instead of storing them in the WORK library).
WORK WORK library WORK= DDname
DDWORK(DDname) SAS data library
Description: contains temporary SAS files that are created by the SAS System during your session.
* SASAUTOS: specification can be a fileref, a partitioned data set name enclosed in quotes, or a series of file specifications enclosed in parentheses.


Chapter Contents

Previous

Next

Top of Page

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