INTRODUCTION TO SAS PROGRAMMING
Overview of SAS
Products
Base SAS - data management and basic procedures • SAS/STAT
- statistical analysis • SAS/GRAPH - presentation quality graphics • SAS/OR -
Operations research • SAS/ETS
- Econometrics and Time Series Analysis • SAS/IML - interactive matrix language
• SAS/AF - applications facility (menus and interfaces) • SAS/QC - quality
control There are other specialized products for spreadsheets, access to
databases, connectivity between different machines running SAS
Basic
Structure of SAS
There are two main
components to most SAS
programs - the data step(s) and the procedure step(s). The data step
reads data from external sources, manipulates and combines it with other data
set and prints reports. The data step is used to prepare your data for use by
one of the procedures (often called “procs”). SAS is very lenient about the
format of its input - statements can be broken up across lines, multiple
statements can appear on a single line, and blank spaces and lines can be added
to make the program more readable.
Structure
of SAS programs
• Lines
beginning with an asterisk (*) are treated as comments. Alternatively you can
enclose comments between /* and */. • You can combine as many data and proc
steps in whatever order you want. • Data steps begin with the word data and
procedure steps begin with the word proc. • The run; command signals to SAS
that the previous commands can be executed. • Terminate an interactive SAS job
with the endsas; statement. • There are global options (like linesize and
pagesize) as well as options specific to datasets and procedures.
FTP Access
SAS provides the ability to read data directly from an FTP server, without
the need to create a local copy of the file, through the ftp keyword of the
filename statement. Suppose there is a data file called user.dat in the
directory public on an ftp server named ftp.myserver.com. If your user name is
joe and your password is secret, the following statement will establish a
fileref for reading the data: filename myftp ftp ’user.dat’ cd=’/public’
user=’joe’ pass=’secret’ host=’ftp.myserver.com’;
Reading SAS
programs from external files
The infile
statement can be used to read data which is stored in a file separate from your
SAS program. When you want SAS to read your program from an external file you
can use the %include statement, followed by a filename or fileref. After SAS
processes a %include statement, it continues to read data from its original
source (input file, keyboard or display manager
It is useful, I love it very much. please share with us more articles. Thank you for your nice post.
ReplyDeleteSAS Training in Chennai
SAS Training Center in Chennai
SAS Training in Porur
clinical sas training in chennai
Placement Training in Chennai
Training institutes in Chennai with placement
soft skills training institutes in chennai
SAS Training in Chennai
Develop Marketing, Advertising and Campaign Management Techniques. Learn how to Research and Build the correct Marketing Strategies for key stakeholders. Pay Per Click Marketing. Google Ads.
ReplyDeletebest digital marketing, digital marketing, skartec digital marketing, skartec digital marketing academy, seo training in chennai, best seo service in chennai, digital marketing blog,seo company in chennai,seo course in chennai,seo training in chennai,digital marketing course in chennai,digital marketing course fees,,digital marketing training in chennai,online digital marketing courses,best digital marketing course,digital marketing classes,digital marketing institute,digital marketing training institute,best digital marketing course in chennai,online marketing courses,digital marketing institute in chennai,digital marketing training,digital marketing course,best online digital marketing courses,advanced digital marketing course,digital marketing course duration,digital marketing couse fees,digital marketing couse fees in chennai,best seo service in chennai,digital marketing blog