0% found this document useful (0 votes)
4 views6 pages

Essential SAS Programming Concepts

The document outlines various programming concepts and statements used in SAS, including basic statements, functions (numeric, character, date), and backend processes. It also covers conditional statements, data manipulation techniques, importing/exporting files, ODS statements, and procedures. Additionally, it discusses macros, SQL integration, and includes a section on interview questions related to SAS programming.

Uploaded by

mahanthivbk
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views6 pages

Essential SAS Programming Concepts

The document outlines various programming concepts and statements used in SAS, including basic statements, functions (numeric, character, date), and backend processes. It also covers conditional statements, data manipulation techniques, importing/exporting files, ODS statements, and procedures. Additionally, it discusses macros, SQL integration, and includes a section on interview questions related to SAS programming.

Uploaded by

mahanthivbk
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

***** BASIC STATEMENTS *****;

1. LIBNAME
2. INPUT
3. DATALINES
4. SET
5. WHERE
6. IF
7. DROP/KEEP
8. RENAME
9. LENGTH
[Link]
[Link] ATTRIBUTES ;

***** FUNCTIONS *****;


[Link] Functions:
-ABS
-INT
-FLOOR
-CEIL
-ROUND
-MAX
-MIN
-SUM
-MEAN
-SQRT
-STD
-N
-NMISS

2. Character Functions:
-LEFT
-TRIM
-STRIP
-CAT
-COMPBL
-SUBSTR
-SCAN
-LENGTH
-UPCASE
-LOWCASE
-PROPCASE
-INDEX
-TRANSLATE
-TRANWRD
-INPUT
-PUT
-COMPRESS
-ANYALNUM
-ANYALPHA
-ANYDIGIT
-ANYPUNCT
-ANYSPACE

3. Date Functions:
-TODAY
-DATE
-DATETIME
-MDY
-DAY
-WEEKDAY
-MONTH
-QTR
-YEAR
-INTCK
-INTNX
-DATEPART
-TIMEPART;

*****WORKING WITH DATTES *****;


1. DATE FORMATS/INFORMATS;
-DDMMYYw.
-DATEw.
-DATETIMEw.
-TIMEw.;

2. YEARCUTOFF OPTIONS;

****** BACKEND PROCESS *****;


[Link] PHASE
-Syntax check
-Input buffer
-PDV
-Descriptor portion/Data portion

[Link] PHASE;
***** CONDITIONAL STATEMENTS ******;
[Link]
[Link]-THEN
[Link]-THEN-DELETE
[Link]-THEN-OUTPUT
[Link]-THEN-ELSE
[Link]-THEN-DO-END-ELSE
[Link] ;

***** COMBINING DATASETS *****;


[Link] TO ONE READING
[Link]
[Link]
[Link]-MERGING

-FULL JOIN/MERGE
-INNER JOIN
-LEFT JOIN
-RIGHT JOIN

-LEFT OUTER JOIN


-RIGHT OUTER JOIN
-FULL OUTER JOIN;

***** DO LOOPS & ARRAY STATEMENT *****;


1. LOOPS (DO, DOUNTIL, DOWHILE) ;

2. IMPLICIT ARRAY----------> DO OVER


3. EXPLICIT ARRAY----------> DO ITERATION;

***** IMPORTING/EXPORTING EXTERNAL FILES *****;


[Link] STATEMENT
[Link] IMPORT
[Link] EXPORT;
[Link] and FILE STATEMENTS;
***** ODS STATEMENT *****;
ODS :
HTML- Hypertext Markup Language
RTF - Rich Text Format
PDF - Portable Document Format ;

***** [Link] and [Link] *****;


[Link]
[Link];

***** OPTIONS STATEMENT *****;


[Link]
[Link]
[Link]/NODATE;

***** PROCEDURES *****;


1. Proc Print
2. Proc Sort
3. Proc Contents
4. Proc Freq
5. Proc Format
6. PROC APPEND
7. Proc Means
8. Proc Summary
9. Proc Transpose
[Link] Import
[Link] Export
[Link] Datasets
[Link] printto
[Link] copy
[Link] Report;
***** MACROS ******;
[Link] is a macro?
[Link] of the sas macro
[Link] is a Macro name, Macro variable?
[Link] of macro variables
-System defined
-User defined
-Global mv
-Local mv
[Link] to create a macro variable
-%let
-macro parameters
-keyword parameter
-positional parameter
-Call symput - data step
-into: clause - proc sql;
[Link] debugging options
-Merror
-Serror
-Mprint
-Mlogic
-Symbolgen
[Link] to call SAS Macro from External Location
-%Include;
8.%IF - %THEN
[Link] functions
1.%Substr
2.%Scan
3.%Eval
4.%Sysevalf
5.%Sysfunc;
***** SQL *****;
[Link] of SQL
[Link]
3 FROM
4 WHERE
6 GROUP BY
7 HAVING
8 ORDER BY
[Link] a Table from SQL
[Link] making in SQL with
-Case-When-End
[Link] Duplicate Rows with
-DISTINCT
[Link]
[Link]

*** INTERVIEW QUESTIONS ************;

You might also like