Don't forget to create account on our site to get access to more material made only for free registered user.  
SAS A00-211 Certification SAS A00-212 Certification Questions and Answers SAS A00 240 Certification Material SAS A00-250 Exam Material Certification SAS Packaged Solutions

Question 2 : The following SAS program is submitted:

(insert statement here)

%let development = ontime; 

proc print data = sasuser.highway; 

    title "For &dept"; 

    title2 "This project was completed &development"; 


Which one of the following statements completes the above and resolves titlel to "For research&development"?

1.     %let dept = %str(research&development);

2.      %let dept = %str(research%&development);

3.     %let dept = %nrstr(research&development);

4.      %let dept = %nrstr(research%&development);

Correct Answer 3 :

Exp : %STR and %NRSTR Functions

Mask special characters and mnemonic operators in constant text at macro compilation.

If a special character or mnemonic affects the way the macro processor constructs macro program statements, you must mask the item during macro compilation (or during the compilation of a macro program statement in open code) by using either the %STR or %NRSTR macro quoting functions.


%NRSTR also masks the following characters: 

& %


percent sign before a quotation mark - for example, %' or %",  percent sign with quotation mark 

EXAMPLE: %let percent=%str(Jim%'s office);


 percent sign before a parenthesis - for example, %( or %)  two percent signs (%%): 

 EXAMPLE: %let x=%str(20%%);


character string with the comment symbols /* or -->  %STR with each character 

EXAMPLE: %str(/) %str(*) comment-text %str(*)%str(/)


%nrstr() mask macro triggers such as %, $ and &