Question-131: How many “WHERE” statement you can have in a step?

Answer: You should have only one WHERE statement in a step to filter the observation, however if you put more than one WHERE statement SAS would not give any error but consider the only last WHERE statement. And also keep in mind you can use the variable in the WHERE statement which is not defined in the var statement as well.

 

Question-132: What is the use of CONTAINS operator?

Answer: Using the “CONTAINS” operator you can check the substring value match. For example as below.

 

where courseName CONTAINS 'SQL';

where courseName ? 'SQL';

Instead of CONTAINS keyword you can use ‘?’ symbol as well.

 

 

Question-133: Setting System options applies to?

Answer: Entire active SAS session and not to the specific program.

 

Question-134: If you want to process only observations between 3 and 10, how can you control that?

Answer: We can control this using OBS= and FIRSTOBS= options. In this case we would put FIRSTOBS=3 and OBS=10. Hence, it would start processing the 3rd observation go until 10th observations.

 

Question-135: Can I override the system option in the current session for specific data step?

Answer: Yes, we can do. For a particular data step by putting them in parenthesis at the end of statement for example as below.

proc print data=he_sas.he_data(firstobs=3 obs=10);