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?

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

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.

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