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.

sas-innovate-2024.png

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.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 682 views
  • 0 likes
  • 3 in conversation