BookmarkSubscribeRSS Feed

Techniques for User Code in SAS Data Integration Studio

Started ‎09-28-2017 by
Modified ‎04-17-2023 by
Views 10,050

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:

  • Apply a user-written code transformation in a SAS Data Integration Studio job.
  • Work with source and target tables to integrate your code into the job flow.
  • Use the manual and automated Update Table Metadata utility.
  • And more!

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.

 

User Code in SAS Data Integration Studio.PNG

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.

Comments

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

@wreeves, Hi Wendy,

Thanks for the info.

Best,

Markus

Version history
Last update:
‎04-17-2023 11:17 AM
Updated by:
Contributors

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Article Labels
Article Tags