Professional Documents
Culture Documents
Statements
Variables
Dataset
12. Difference between Informat and Format. ↑
Informat - To tell SAS that a number should be read in a particular format.
17. How Data Step Merge and PROC SQL handle many-to-many relationship? ↑
Data Step MERGE does not create a cartesian product incase of a many-to-many relationship. Whereas, Proc SQL p
19. How do you use the do loop if you don’t know how many times you should execute the do loop? ↑
We can use ‘do until’ or ‘do while’ to specify the condition.
21. What is the one statement to set the criteria of data that can be coded in any step? ↑
WHERE statement can sets the criteria for any data set in a data step or a proc step.
22. What is the difference between PROC MEANS and PROC Summary? ↑
The difference between the two procedures is that PROC MEANS produces a report by default. By contrast, to prod
_N_ is a data counter variables used to indicate the number of times that SAS has looped through the data step.
_ERROR_ is a implicit variable created by SAS during data processing. It gives the total number of records SAS has it
28. What is the difference between %LOCAL and %GLOBAL? ↑
% Local is a macro variable defined inside a macro. %Global is a macro variable defined in open code (outside the m
29. What do you understand by CALL MISSING Routine? ↑
The character or numeric variables that are specified can be assigned missing values through the CALL MISSING rou
The single trailing @ tells the SAS system to “hold the line”.
The double trailing @@ tells the SAS system to “hold the line more strongly”.
32. How to count unique values by a grouping variable? ↑
You can use PROC SQL with COUNT(DISTINCT variable_name) to determine the number of unique values for a colum
34. When grouping is in effect, can the WHERE clause be used in PROC SQL to subset data? ↑
No. In order to subset data when grouping is in effect, the HAVING clause must be used. The variable specified in ha
nmissing statements.
umeric, we use SELECT construct rather than IF-THEN or IF-THEN-ELSE statement because CPU time is reduced.
nds with a semicolon and the statement can be in upper-or lowercase letters.
from the score of a second variable X. X is referred to as the predictor variable and Y as the criterion variable.
te the do loop? ↑
so considered as characters although there are implicit functions to work upon dates.
y default. By contrast, to produce a report in PROC SUMMARY, you must include a PRINT option in the PROC SUMMARY statement.
gh the SAS system, one at a time. When a program is executed, an Input Buffer is created that reads data values and makes them assigned
DO WHILE expression is evaluated at the top of the DO loop. If the expression is false the first time it is evaluated, then the DO loop neve
ed. The variable specified in having clause must contain summary statistics.