|
data Output_1 (label="Outputted Three Columns Not Aligned");
input Txt_Field : $23.;
if upcase(substr(Txt_Field,1,2))='VS' then VS=Txt_Field;
else if upcase(substr(Txt_Field,1,2))='PO' then Pool=Txt_Field;
else Site=Txt_Field;
drop Txt_Field;
datalines;
vs_17001_crn
pool_7001_crn
10.1.66.19:7001
10.1.66.104:7001
vs_17002_cognos8
pool_7002_cognos8
10.1.66.19:7002
10.1.66.104:7002
vs_17003_cognos8
pool_7003_cognos8
10.1.66.19:7003
10.1.66.104:7003
vs_17080_cognosreport
pool_17080_cognosreport
10.1.66.18:80
;
run;
data VS POOL Site;
input Txt_Field : $23.;
if upcase(substr(Txt_Field,1,2))='VS' then output VS;
else if upcase(substr(Txt_Field,1,2))='PO' then output POOL;
else output Site;
datalines;
vs_17001_crn
pool_7001_crn
10.1.66.19:7001
10.1.66.104:7001
vs_17002_cognos8
pool_7002_cognos8
10.1.66.19:7002
10.1.66.104:7002
vs_17003_cognos8
pool_7003_cognos8
10.1.66.19:7003
10.1.66.104:7003
vs_17080_cognosreport
pool_17080_cognosreport
10.1.66.18:80
;
run;
data Output_2 (label="Outputted Three Columns Aligned");
merge VS(rename=(Txt_Field=VS))
POOL(rename=(Txt_Field=Pool))
Site(rename=(Txt_Field=Site));
run;
|
|