CALL SYMPUT VS. CALL SYMPUTX
使用SAS macro的朋友都知道 call symput,这是个非常有用的东东,在data step和macro之间建立了一个接口。
大家用的最多,接触最早的是call symput,其实SAS还提供了它的一个兄弟,更强大的call symputx。
The four benefits of CALL SYMPUTX are:
1.) CALL SYMPUTX does not write a note to the SAS log when the second argument is numeric. CALL SYMPUT, however, writes a note to the log stating that numeric values were converted to character values.
2.) CALL SYMPUTX uses a field width of up to 32 characters when it converts a numeric second argument to a character value. CALL SYMPUT uses a field width of up to 12 characters.
3.) CALL SYMPUTX left-justifies both arguments and trims trailing blanks.CALL SYMPUT does not left-justify the arguments, and trims trailing blanks from the first argument only. Leading blanks in the value of name cause an error.
4.) CALL SYMPUTX enables you to specify the symbol table in which to store the macro variable, whereas CALL SYMPUT does not. This is accomplished by an optional third argument to the SYMPUTX function.