VERSION 8.2
The Statistical Analysis System (SAS) is a set of computer programs used with relatively simple commands to produce a variety of statistical analyses. SAS will perform simple descriptive statistics, crosstabulations, analysis of variance, regression and factor analysis, and time series analysis, as well as user-formatted reports. This documentation gives information about using SAS at USC, including which SAS release is current, a listing of available documentation, examples of JCL needed for submitting batch SAS jobs through MVS, and procedures for running SAS programs under VM/CMS.
This documentation was produced by the Academic Services at USC's Computer Services. Questions about its content, as well as questions about SAS procedures, should be directed to a SAS consultant at 777-6865.
NOTE: For information on SAS modules under USC site license for Windows and Macintosh operating systems, refer to the handout Computer Services' Software Distribution web site, http://www.sc.edu/software/others.shtml#sas.
THe current release of SAS in batch mode (MVS) is version 8.2 SAS data sets created with versions 5 and 6 can be read using version 8.2
Documentation is available on campus at http://www.sc.edu/ardc/sashtml/online.doc. Faculty, staff, and students who purchase SAS/Windows can get a CD containing all of the SAS documentation.
The following SAS manuals are available from the SAS Series in Statistical Applications:
SAS System for Elementary Statistical Analysis. Teaches how to perform a variety of data analysis tasks and interpret the results. Topics include comparing two or more groups, simple regression and basic diagnostics, as well as basic DATA steps.
SAS System for Linear Models, Fourth Edition. Uses tutorials and examples to teach you the most appropriate SAS procedures for linear models.
SAS System for Regression, Third Edition. Illustrates simple and multiple regression with a wide variety of examples. Examples feature numerous SAS procedures including REG, PLOT, GPLOT, NLIN, RSEG, AUTOREG, PRINCOMP, and others.
You can search for publications on many topics at the SAS Publishing site: http://www.sas.com/apps/pubscat/welcome.jsp
You can subscribe to various electronic newsletters from SAS as well at:
http://www.sas.com/subscriptions/index.html
SAS Institute offers training courses on numerous SAS topics throughout the year. SAS Institute also offers a variety of training packages for instructor-based, video-based, and computer-based educational programs. Persons interested in registering for SAS courses or in ordering SAS courseware products should consult the SAS Institute Training page:
Following are other documentation available from Academic Research and Data Center of USC which deal with SAS-related topics:
BMDP - Documents the SASBMDP procedure for using SAS to access BMDP.
SASINST612 - Installations instructions for SAS 6.12 for Windows.
SASINST81 - Installations instructions for SAS 8.1 for Windows.
SASLICMAC - Updating SAS Licensing Information for Mac.
SASLIC612 - Updating SAS 6.12 Licensing Information for Windows.
SASLIC81 - Updating SAS 8.1 Licensing Information for Windows.
SASPROCS - Lists enhancements and new procedures in SAS 8.1.
SASY2K - SAS and Y2K Information
JCL - Documents the use of Job Control Language for submitting batch jobs.
SUBMIT - Documents the procedures for submitting batch jobs from CMS.
PCSAS - Documents SAS modules available under USC site license for DOS, Windows, OS/2 and Macintosh Operating Systems, and describes ordering procedures.
In addition to these documents , Academic Services has available
the following other SAS-related documents:
SAS Usage Notes - Lists known problems in SAS and useful tips for dealing with common difficulties encountered by SAS users.
In addition to these publications, Computer Services IT Training and Support offers regular short courses in SAS. Shorter presentations on special topics can be scheduled upon request. For information on the next regularly scheduled short course, series interested persons should contact the IT Training and Support at 803-777-6015.
Following is the basic Job Control Language (JCL) needed for running SAS Version 6.09 in regular batch mode on the USC system:
JOB statement
// EXEC SAS
Optional DD statements
//SYSIN DD *
SAS program statements
//
Following are examples of DD statements for a variety of functions:
1. Reading raw data from a disk storage data set named N123456.DATASET:
//FILEIN DD DSN=N123456.DATASET,DISP=SHR
NOTE: The DD name (FILEIN in this example) must match the
name on the SAS INFILE statement.
2. Reading raw data from the first file on a standard-label, cartridge tape
with a serial number of 456789:
//TAPEIN DD DSN=N123456.TAPEFILE,UNIT=CTAPE,
// VOL=SER=456789,LABEL=(1,SL),DISP=SHR
NOTE: The DD name (TAPEIN in this example) must match the
name on the SAS INFILE statement.
3. Outputting a SAS file called N123456.SASFILE (requiring approximately 7
tracks) to disk storage (1 track on disk storage equals 56,664 bytes):
//OUTFILE DD DSN=N123456.SASFILE,
// UNIT=DASD,DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(7,3),RLSE)
NOTE 1: No DCB information should be coded. The DD name (
OUTFILE in this example) must match the first part of the two-part name for the
output file.
4. Outputting a SAS file called N123456.SASFILE as the second file on
a standard-label cartridge tape with serial number 456789:
//OUTFILE DD DSN=N123456.SASFILE,UNIT=CTAPE,
// VOL=SER=456789,LABEL=(2,SL),DISP=(NEW,CATLG,DELETE)
See note for Example 3.
5. Reading the SAS file, N123456.SASFILE from disk storage:
//IN DD DSN=N123456.SASFILE,DISP=SHR
NOTE: The DD name (IN in this example) must match the
first part of the two-part name used to read it.
6. Reading the SAS file, N123456.SASFILE from the second file of a standard-label
cartridge tape with serial number 456789.
//INTAPE DD DSN=N123456.SASFILE,UNIT=CTAPE,
// LABEL=(2,SL),VOL=SER=456789,DISP=OLD
See Note for Example 5.
7. Outputting raw data in card image to a disk storage data set called
N123456.OUTSAS, allocating approximately 14 tracks:
//OUTFILE DD DSN=N123456.OUTSAS,UNIT=DASD,
// DCB=(LRECL=80,BLKSIZE=9040,RECFM=FB),
// SPACE=(TRK,(14,1),RLSE),DISP=(NEW,CATLG,DELETE)
NOTE: The DD name (OUTFILE in this example) must match
the the name on the FILE statement used to create it.
8. Outputting raw data to paper:
//OUT DD SYSOUT=A
//SASLIST DD SYSOUT=A,COPIES=10
NOTE: The SASLIST DD statement is not normally coded in
the JCL because it is part of the cataloged SAS procedure. The effect, when
used as in this example, is to override the DD statement in the cataloged procedure.
This DD statement should follow the
EXEC statement and precede the
SYSIN DD * statement.
When running SAS jobs there are two aspects of space to consider: workspace and memory. Workspace is the amount of temporary disk space needed to store SAS data sets while the SAS job is running. Memory is the CPU REGION required to execute the job.
The amount or workspace a job will require depends on such factors as the size of the data set read into SAS, the number of new variables created in the job, whether the data set is sorted during the job, the number of times it is subset, etc. By default workspace is set at 12 cylinders of primary allocation and 5 cylinders of secondary allocation. If there is not enough workspace, SAS issues the following message:
ERROR: WRITE TO WORK.XXXX.DATA FAILED. FILE IS FULL AND
AND MAY BE DAMAGED.
where "xxxx" is the name of the current SAS data set
To increase workspace, add the following statement after the "// EXEC SAS" line in your job setup.
//WORK DD SPACE=(CYL,(xx,yy))Replace "xx" and "yy" with the primary and secondary allocations. Version 8.2 of SAS requires at least 4096K of REGION. If you specify less REGION on the JOB or EXEC statements of the SAS job, it will not execute.
If a job abends due to insufficient REGION, SAS issues a message indicating that more memory is needed to complete the task, and suggests an amount to use. To increase memory to the required amount, use the REGION parameter on the JOB statement to specify the required amount. For example, REGION=6000K.
*SAS is the registered trademark of SAS Institute Inc., Cary, N.C. 27511, U.S.A.