Dear friends looking for your help.
Kindly suggest:
Description
Pattern: A103,A104,A105,A106 belong to same person;
i need output data in form of
ID year month value_of_A103 value_of_A104 value_of_A105 value_of_A106
A103|A104|A105|A106 1976 M01 9.4 596104 5739058 6335162
there thousands of id in same pattern. kindly suggest
please find attached sample file.
Does this make sense to you?
data banktest;
infile "&sasforum.\datasets\banktest.txt" firstobs=2 dlm='09'x;
input ID $ year Month $ value;
run;
proc sort data=banktest; by year month id; run;
data banktemp;
length newId $64;
do until(last.month);
set banktest; by year month id;
if last.id then newId = catx("|", newId, Id);
end;
do until(last.month);
set banktest; by year month;
output;
end;
run;
proc transpose data=banktemp prefix=value_of_
out=bankWant(drop=_name_);
by year month newId notsorted;
id id;
var value;
run;
proc print data=bankWant noobs; run;
PG
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.