ygcd(RAW) | ygtx(RAW) | val(Target) | pcd(target) | yg(raw) |
DEL70 | NEW | 11(num datatype) | DEL70N | 11 |
DEL70 | OLD | 22 | DEL70T | 22 |
DEL70 | PROPER | 33 | DEL70D | 33 |
Hi I am using EG 7.2 also MS office competible.
Without excel raw also I am ok .
Hi ,
Can we make macro by using excel raw data???? ( ygcd,ygtx,val, pcd )
When new is present then at the end of pcd = _____N;
when old is present then at the end of pcd=_____T;
When Proper is present then at the end of pcd = ____D;
data T2;
set T1;
if ygcd="DEL70" and ygtx="NEW" then do ;
val = input (yg, best.);
pcd = "DEL70N";
end;
if ygcd="DEL70" and ygtx="OLD" then do ;
val = input (yg, best.);
pcd = "DEL70T";
end;
if ygcd="DEL70" and ygtx="PROPER" then do ;
val = input (yg, best.);
pcd = "DEL70D";
end;
run;
Regards
Priyanka
Seem that there are sverel questions here.
Can you use Excel raw data: if you mean a regular spreadsheet - yes. But depends on what license you have etc.
How do you mean a macro would work in your scenario?
If you can show what input data you have (Excel raw and potentially other) and the desired output (in table format and potentially report if that is your goal).
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.