BookmarkSubscribeRSS Feed
vinavani
Calcite | Level 5

Quite often I do not want to place file on server and want to place data for analysis as data lines in program only. If I copy paste data from excel or text file. it does not read the data. What needs to be done?

3 REPLIES 3
art297
Opal | Level 21

Not sure if you posted your question in the right forum.  Have you tried to do it using a data step?  If so, it would help if you posted the code you tried.

Reeza
Super User

I don't think this is the right area either, and you also need to provide more information.

Do you have SAS installed on your desktop, or are you only using SAS on demand.

If you have it on your desktop and have EG, try the following:

http://blogs.sas.com/content/sasdummy/2013/01/21/turn-your-data-set-into-a-data-step-program/

Mit
Calcite | Level 5 Mit
Calcite | Level 5

Do you like this?


* variable names copied from Excel but typed a $ after each character variable;
* data lines copied from Excel file;

Data have;
input name $ age  height weight gender $;
datalines;
A 20 158 50 F
B 25 175 70 M
C  30 170 65 F
D 35 185 95 M
;
run;






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
  • 3 replies
  • 1095 views
  • 0 likes
  • 4 in conversation