“call symputX” is the symput upgrade

This post was kindly contributed by AFHood Analytics Group - Blogs » SAS - go there to comment and to read the full post.

SymputX is the upgrade from Call Symput.

Syntax:

call symputx(“macro_var_name”, character_value (or numeric to be converted to char), symbol table def);

Where symput will produce a note about converting character values to numeric, symputx won’t produce such a note. Additionally it will strip leading and trailing spaces form the character value. Lastly, you can define which symbol table should be used (G=global, L=local, F=operates like symput).

data test;

set test_old;

call symput(‘variable_name’, ‘numeric value’) /* gets a warning although it runs successfully*/;

call symputx(‘xvariable_name’, ‘numeric value’) /* no warning for numeric conversion*/;

run;

This post was kindly contributed by AFHood Analytics Group - Blogs » SAS - go there to comment and to read the full post.