SAS Certified Adv Programmer 130 Questions (12)
Given the following SAS statement:
%let idcode = Prod567;
Which one of the following statements stores the value 567 in the macro variable CODENUM?
A. %let codenum = substr(&idcode,length(&idcode)-2);
B. %let codenum = substr(&idcode,length(&idcode)-3);
C. %let codenum = %substr(&idcode,%length(&idcode)-2);
D. %let codenum = %substr(&idcode,%length(&idcode)-3);
Topics:
SAS Adv Questions |
2 Comments »
C
C: retrieve the substring from the 5 th position