| SAS Companion for the OS/390 Environment |
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.
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
7 format so that it can be accessed by the V7 engine. (See Using the V7 and V6 Engines for information
about the V7 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.
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
/*
//
If you invoke SAS interactively, then include the WORK
operand in the SAS CLIST command, as in the following example:
sas work('1000,400')
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.
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.
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 7 or Version 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.
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;
-
The LIBNAME statement associates the libref TEMP
with the temporary physical file &TVTEMP.
-
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.
-
A one-level name is used in the DATA statement.
When the DATA step is processed, the SAS data set TEMP.TOTALUSA is created.
-
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.
-
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.
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:
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.
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.
-
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.
-
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.
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.
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:
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.
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.
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.
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.
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.)
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.