Hi All,
I have a SAS Data set with BATCH_NO, SNAPST_DT and TABLE_NM variables and some values.
I have a .sas file. Upon executing this .sas file it creates some values to the environment variables. Now, I want to insert those values into the SAS dataset. Please suggest me how can I do that.
I found a way of updating the SAS data set update by using the below code:
This is an untested code, you should try to join the two tables lib1.a_batch_table_met_one
and the one table have with new variables and join them on BATCH_NO and TABLE_NM variables.
proc sql;
create table want as select a.*,b.var1,b.var2 from lib1.a_batch_table_met_one as a left join have as b on a.batch_no=b.batch_no and a.table_nm=b.table_nm;
quit;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.