BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Daily1
Quartz | Level 8
hi
i have 
SR	ID	S	S_G	TS	TS_G
1	19	1	5	7	2
2	20	5	8	6	1
3	21	5	7	2	1


i want 
SR	ID	nw1	nw2
1	19	1	7
		5	2
2	20	5	6
		8	1
3	21	5	7
		7	2
1 ACCEPTED SOLUTION
2 REPLIES 2
Ksharp
Super User
/*You want a dataset or report ?*/
data have;
infile cards;
input SR ID S S_G TS TS_G;
cards;
1 19 1 5 7 2
2 20 5 8 6 1
3 21 5 7 2 1
;

proc odstable data=have;
column  SR ID (S TS)*(S_G TS_G);
define S;
header='nw1';
end;
define TS;
header='nw2';
end;
run;

Ksharp_0-1688730109014.png

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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 lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1044 views
  • 3 likes
  • 3 in conversation