Did you miss the Ask the Expert session on Techniques for User Code in SAS Data Integration Studio? You can find the slides from the webinar attached to this post.
SAS Data Integration Studio provides a powerful visual design tool for building, implementing and managing data integration processes – regardless of data sources, applications or platforms.
This one-hour webinar will show you how to:
In this post I've also attached the slides, the starting SAS program code that was used as the example for the demonstration, and a SAS program that creates the two source datasets for the starting SAS program.
Here are some highlighted questions from the Q&A segment held at the end of the session for ease of reference.
In the User written transformation what is the difference between user written body and all user written?
These are choices you can select in the Code tab within the properties for the User Written transformation. I have been using the default choice "user written body" so that SAS Data Integration Studio automatically creates the macro variables like &_input1 and &_output1 that I am taking advantage of in my code to integration my code with the source and target tables connected to the transformation in the job. When you select "all user written" those macro variables are not generated and assigned values. You would only use that choice if you did not need to integrate your code with source and or target tables that are part of the job.
Can some user choices be optional when creating custom transformations and can you set default values?
Yes. In my example I created all my Prompts as required because they needed to be used in order for my user code to execute without error, but if some of the prompt values are not necessary and optional in your code then you can also choose to make them optional in the user transformation you create. You can also specify default values for many of the Prompt types whether they are defined as optional or required.
With the Custom transformations, can you still use code to define and set values for macro variables or do all the values need to be assigned with prompts?
You can still use code to define and set values for macro variables. As long as those macro variable names do not have the same name as any prompts you define then the macro variables in your code will be separate and independent from the macro variables assigned values though the prompts.
Can the User written or Custom transformations output to target table that is a permanent registered SAS dataset?
Yes. If you change the target or source table that is connected to the transformations, the values that SAS Data Integration Studio automatically assigns to the &_input and &_output macro variables will change accordingly. So you can feel free to change the source and target tables in the job.
Want more tips? Be sure to subscribe to the Ask the Expert board to receive follow up Q/A, slides and recordings from other SAS Ask the Expert webinars. To subscribe, select Subscribe from the Options drop down button above the articles.
Hi,
I just tried to access the webinar. But the link didn't work.
Do you have any sugegstions?
Best
Markus
@MarkusWeick Hi Markus,
Unfortunately, that webinar is no longer available. You can view the pdf of the slides that were shown during the webinar. It is attached to the post. I will update this post to remove the link to the webinar. Sorry for this inconvenience.
Thank you,
Wendy
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Ready to level-up your skills? Choose your own adventure.
Your Home for Learning SAS
SAS Academic Software
SAS Learning Report Newsletter
SAS Tech Report Newsletter