I have a macro in the precode of a SAS DI job, and inside there I have the following code:
%let mtransformid = %str(omsobj:TransformationStep\&TransformID);
%let rc = %sysfunc(metadata_getattr("&mtransformid","Name",transform_name));
%put &transform_name;
However, I keep getting the error message that the symbolic reference to &transform_name
cannot be resolved on that last step. I've tried wrapping the call to metadata_getattr
in a data step within the macro, but that didn't seem to help either:
%let mtransformid = %str(omsobj:TransformationStep\&TransformID);
data _null_;
rc = metadata_getattr("&mtransformid","Name",trans_name);
call symputx("transform_name",trans_name);
%put &transform_name;
run;
The above %put
statement results in the error message "Apparent symbolic reference TRANSFORM_NAME not resolved", unless I've "initialized" the macro variable earlier, in which case its previous value is output.
For reference, &TransformID
is a macro variable that gets autogenerated by SAS DI for every transformation as it is run. Also, here are some relevant links that I've been trying to use to get ideas from:
Any help is greatly appreciated!
)
on the second line - is that true in the actual code? - Joerc = ...
do you trycall symput
like in link 1? If so, what happens? - Joe