BookmarkSubscribeRSS Feed
marianthi86
Calcite | Level 5

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!

2 REPLIES 2
PaigeMiller
Diamond | Level 26

@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.

--
Paige Miller
ballardw
Super User

What other columns? The data sets you show will only contain the variable ID.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 1103 views
  • 0 likes
  • 3 in conversation