BookmarkSubscribeRSS Feed
datalines
Calcite | Level 5

Data ds1;

Infile datalines;

Input id name$ sex$ age sa

  • RAM M 23 5000
  • RAJ F 27 4500
  •  

     

    MAHI F 21 7000
  • RANI F 23 4400
  • ROJA M 25 5800

Run;

1 REPLY 1
ballardw
Super User

And the question is what exactly?

 

Best practice is to post code in a code or text box opened with the "running man" or </> icon above the message window. The text box will prevent the forum from reformatting code and possibly inserting/removing characters resulting in code that will not run or replaces some strings with odd characters such as bullet points.

 

Actual lines of data should be preceded by a CARDS; or DATALINES; statement with the semicolon.

If your inline data contains semicolons then use CARDS4; or DATALINES4; and end your data section with 4 semicolons.

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
  • 1 reply
  • 200 views
  • 0 likes
  • 2 in conversation