Hi,
I have three data that i want to sort. DataA, DataB, and baseline
I used the following syntax:
data dataa;
input ID @@;
cards;
501 502 503 504 505 506 507 508 509 510
;
Data datab;
input ID @@;
cards;
501 502 503 504 505 506 507 508 509 510
;
data baseline;
input ID @@;
cards;
501 502 503 504 505 506 507 508 509 510 601 602 603 604 605
;
Resorting by ID was accomplished however all other columns from all three data were deleted. How can i resort my ID without deleting any columns?
Please Help.
Thanks!
@marianthi86 wrote:
Hi,
I have three data that i want to sort. DataA, DataB, and baseline
I used the following syntax:
data dataa;
@ input ID @@;
cards;
501 502 503 504 505 506 507 508 509 510
;
Data datab;
@ input ID @@;
cards;
501 502 503 504 505 506 507 508 509 510
;
data baseline;
@ input ID @@;
cards;
501 502 503 504 505 506 507 508 509 510 601 602 603 604 605
;
Resorting by ID was accomplished however all other columns from all three data were deleted. How can i resort my ID without deleting any columns?
Please Help.
Thanks!
How can we know what you are talking about if you don't give us the details???
There is no sorting done in your program.
What other columns? The data sets you show will only contain the variable ID.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.