Sas Qa2

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

SAS Q&A-2

1. madhu said,
What is the effect of the OPTIONS statement ERRORS=1?

2. Kiran said,
If ERRORS=1 then only 1 data error statement is printes on Log

3. I. HARI PRASAD REDDY said,


What does the RUN statement do? it will excutes the programme.

4. anup said,
How would you remove a format that has been permanently associated with a variable??

5. Saxena, Sameer said,


What do the SAS log messages numeric values have been converted to character mean? What are the implications? These SAS log messages shows that the all of the numeric values have been converted to character values. When using the put function in your program, the numeric values are converted into character values.

6. srikanth said,
How are numeric and character missing values represented internally? ans:basically charactor values are reprasented by blank space numaric values are reprasented by dot in sas data set.

7. srikanth said,
What does the RUN statement do? ans: it is end of the program it executes the program.

8. srikanth said,

What areas of SAS are you most interested in? ans:formats,macros,proc sql,ods,graphsand proc access.

9. srikanth said,
How would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable? ANS:BY USING PROC TRANSPOSE.

10.

Swetha said,

Que: For what purpose you use a retain statement? Ans: To retain the value of a variable in subsequent iterations of the data step.

11.

Swetha said,

3) What do the SAS log messages numeric values have been converted to character mean? What are the implications? Ans) The message means that numeric values are converted into character values automatically whenever numeric data values are used in character context. If put function is used to explicitly convert numeric values to character values then no message is written to the log.

12.

Swetha said,

5) How do you control the number of observations and/or variables read or written? Ans) For controlling observations use OBS= option in the infile statement and for controlling variables use the VAR statement in the data step.

13.

Swetha said,

Correction for Que5) Use the drop and keep options in the data statements.

14.

Swetha said,

6) Approximately what date is represented by the SAS date value of 730? Ans) SAS date value starts from Jan 1st 1960. 730=365+365=2 yrs = Jan 1st 1962

15.

Swetha said,

7) How would you remove a format that has been permanently associated with a variable? Ans) Open the dataset in viewtable window and right click on the columns whose format should be changed/removed and select column attributes from the pop up menu and then do the necessary changes.

16.

gomathi said,

Why is a STOP statement needed for the POINT= option on a SET statement? The STOP statement is used to control the continuous looping in set stement

17.

Sourav said,

Q: Whats the difference between VAR A1 - A4 and VAR A1 A4? A: VAR A1- A4 is a numbered range. Used as a shortcut to describe variables that have same char names and the numbers are in order. Var A1 A4 is the order of the variables as they occur in the data set, and is again a shortcut to refer them. You can see the order of the variables by using Proc Contents on the data file

18.

Sourav said,

Q: What do the SAS log messages numeric values have been converted to character mean? What are the implications? A: Means SAS performed an automatic num to char conversion. Works for some cases, else do an explicit num to char conversion using PUT(VAR, format). Q: What does the RUN statement do A: RUN stat menas the end of any Data or Proc steps before it and execute the stats. There can be as many RUN stats as you want to run blocks of steps separately. Q:What are some good SAS programming practices for processing very large data sets A: Limit the no. of OBS using Firstobs= and obs=. Use a do loop and point= option to generate samples from the data sets. make sure you terminate the point= loop.

19.

Sourav said,

Q: What are _numeric_ and _character_ and what do they do A: the foist one means you want to work on all the numberis variables in your data set. example Mean( of _numeric_). Same with the char. Format _character_ $12. Q: How would you create multiple observations from a single observation? A: USing @ or @@. You can break up the single obs as per your need Q:What is the order of evaluation of the comparison operators: + - * / ** ( ) A: BODMAS ( Bracket, Div, Multi, add, subtraction) Q: How can you put a trace in your program A: ODS Trace ON, ODS Trace OFF

20.

Sourav said,

Q: Have you ever used the SAS Debugger A: YES. Start by submitting Data dat/ debug;.. Debugger window opens. Execute each program line by hitting enter. After the last line type Examine _ALL_ in the command window to execute and check the variable values for one iteration of data step..

You might also like