what are system option ? give few examples ?
what are dataset options and dataset statements ?
if there is a keep option and keep statement ? which one is
executed first ?
Difference between a WHERE statement and IF statement ?
what is the advantage of using WHERE statement option on
the dataset ?

Answer Posted / sushil nayak

1) System options are global instructions that affect the entire SAS session and control the way SAS performs operations. Once you invoke a system option, it remains in effect for all subsequent data and proc steps in a SAS job, unless you specify them. For example .. OPTIONS NODATE PAGESIZE=MAX LINSIZE=MAX NOCENTER; ..search SAS online doc to knw more options.

2)Dataset options are options that you code after dataset name,for example KEEP= DROP= WHERE= FIRSTOBS= OBS=..etc dataset statement are coded anywhere within the data and run statements..for example KEEP DROP WHERE RETAIN ..etc

3)If KEEP= and KEEP statement is coded then KEEP option gets executed 1st and then the statement.

4) The following are some of the differences between the IF and WHERE statement ::
a)IF works on newly created variable within the same DATASTEP(for example, variable created by reading a raw file), but WHERE would not work for newly created variable.

b) IF works on Automatic variable (_n_,first. , last.), but WHERE would not work for the same.

c)WHERE can be applied in PROC and DATASTEPS, but IF can be applied to DATASTEPS only.

d) IF does a char to num conversion or visa-versa while checking a condition (IF NEEDED), but WHERE would no cause ERROR, stating that variable being checked is incompatible variable.

There are other differences, would recommend searching sas online or sas sugi papers to knw more.

5) If a WHERE and IF can be applied with a datastep then WHERE should be choosen, reason being, the WHERE statement is more efficient than IF statement.

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I am preparing SAS Certified Advanced Programmer for SAS 9 in 2014. If anybody has the latest dumps for this exam, please mail me at dhiman.mukherjee@gmail.com

2262


What is the command used to find missing values?

593


how are numeric and character missing values represented internally? : Sas programming

620


how we can create a FLAG datasets? Ex:-ID age_group no_persons 1 to 10 10 to 20 3 11 to 20 21 to 30 7 21 to 3o 31 to 40 5

1659


What is the difference between the proc sql and data step?

663






what is study design in while working with SAS? what are screening variables in SAS?

1681


what is slowly changing dimension? : Sas-di

626


What is the SAS data set?

679


Can you explain the process of calendar?

640


what is data governance? : Sas-di

625


What are the uses of sas?

709


Are you sensitive to code walk-throughs peer review or QC review?

2610


Give some examples where proc report’s defaults are same as proc print’s defaults?

643


How to sort in descending order?

794


How does proc sql work?

618