BookmarkSubscribeRSS Feed
ruchir_m
Fluorite | Level 6

Hi All, 

 

I need to insert the Source & Target Table Details into a table after completion of my all SAS DI jobs. 

 

I am using a SAS macro as a postcode of my DI job to collect all other details but I am not able to get the source and target table details.

 

In DI job, I have seen details of the Source/ Target Table in the comment but I am not able to find a process to capture this detail and use it later. 

 

Please let me know if anyone is aware of it. 

 

Thanks in advance   

5 REPLIES 5
ruchir_m
Fluorite | Level 6

Thanks Kurt.


I tried but i wasn't able to find the macro variable for details on Source and Target table. 

kiranv_
Rhodochrosite | Level 12

it has been very longtime i did used DI studio. check for something like below like &_output  which is your target table ot &syslast or &_input for source tables

 

 

data
&_OUTPUT; 
  set &SYSLAST; 
  length sex $1; 
  if gender = "Male" then 
    sex = "M"; 
  else if gender = "Female" then 
    sex = "F"; 
  else 
  sex="U"; 
run;

 

Patrick
Opal | Level 21

@ruchir_m

Look into the code of the transformation where you use the tables as source and target. You'll find in there macro variables generated like &_input and &_output.

Add post code to this node which does something like

%global mySourceTbl myTargetTbl;
%let mySourceTbl=&_input;
%let myTargetTbl=&_output;

You then can use these macro variables in your job post code.

ruchir_m
Fluorite | Level 6

Hi Patrick , 

 

I am not able to find _input and _output variables. Do I need to enable some option?

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore Now →
Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 3119 views
  • 0 likes
  • 4 in conversation