BookmarkSubscribeRSS Feed
yemji
Calcite | Level 5
I have two rows read from a file with three variables as below
var1 var2 var3
a b
c

the output needs to be like dis
var1 var2 var3
a b c
5 REPLIES 5
novinosrin
Tourmaline | Level 20
data have;
input var1 $ var2 $/ var3$;
cards;
a b
c
;
PeterClemmensen
Tourmaline | Level 20

So your data looks like this, correct? Is this data actually representative of your data?

 

data have;
input var1 $ var2 $ var3 $;
infile datalines missover;
datalines;
a b
c
;
yemji
Calcite | Level 5
nope this is how i am getting my output. i am trying to read a file im which first row contains data for first two observations and second row contains data for the third observation.
novinosrin
Tourmaline | Level 20
first row contains data for first two observations or is it variables? did you test the code i gave you?
yemji
Calcite | Level 5
sorry my bad its variables. let me try and get back

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 5 replies
  • 778 views
  • 0 likes
  • 3 in conversation