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?

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 1831 views
  • 0 likes
  • 4 in conversation