I have some macro variables which need to be incorporated across multiple jobs.
Basically, a macro in DI Studio.
My initial solution: Creating a new transformation containing the code, e.g.
data _null_;
set DSET;
call symput('DATEVAR1 ', put(DATEVAR1 , 8.));
run;
However, when I add the transformation to a job, it does not retain the code.
The Code tab is empty.
Is there a different way of doing ? Would prefer a transformation, which will be available to other users as well.
DI Studio 4.904
OS: Win Server 2016
Make sure you are creating the macro variable in that node. Also try using symputx instead of symput.
Check the value in that node:
%put &=DATEVAR1;
Not sure if it helps for you case, but there is a parameter tab with many, many options:
1.1. For a particular job:
1.2. In any transformation of that job:
I can't remember ever having had such an issue with a custom transformation. What I would do in such a case using DIS:
If above still doesn't resolve your issue then I'd check if it's an issue with your DIS job or with the custom transformation by:
...and if all of the above doesn't help then I'd contact SAS Tech Support
Of course you can try out the trouble shooting suggestions in this thread.
But since this data doesn't seem to have any direct impact of you data flow (lineage), you could either create an actual macro, and call that in your jobs pre-code.
Or, if you bu multiple jobs mean almost all jobs, execute the code in the autoexec.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.