CALLSYMPUT () 和CALL SYMPUTX ()可以实现在DATA步的执行过程中创建宏变量。二者的主要区别在于CALL SYMPUTX ()会将第二个参数值前面和后面的空格去掉;并且CALL SYMPUTX ()有第三个参数来限定宏变量存放的位置。
Re: call symputx vs. symput Posted 05-04-2022 01:58 PM (2533 views) | In reply to GN0001 The documentation has it description of the differences. Comparisons CALL SYMPUTX is similar to CALL SYMPUT. Here are the differences. CALL SYMPUTX does not write a note to the SAS log when th...
CALLSYMPUTXdoes 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. CALLSYMPUTXuses a field width of up to 32 characters when it converts a numeric second argume...
通过%do循环,其中循环体变量,⾃动就是⼀个宏变量,这⼀点⽐较容易被忽略,但是事实就是如此,例如; %macro test_macro(); %do i=1 %to 100; %put &i.; %end; %mend; *4.通过data步中的call symput 或者symputx,例如:; data test ; input x $ y $; datalines; hello wor hu juju as dd...
How to retrieve the macro variable value for each observation (or particular observation) using %SYSCALL SET() as compared to CALL SYMPUTX() where we can get macro variable value for specific observations (such as 1 anf 19 in exmaple below). %let dsid=%sysfunc(open(sashelp.class,i)); ...