BookmarkSubscribeRSS Feed
manilara44
Calcite | Level 5

i have data set in note pad like that i want import into sas 


Car Make Model Type Origin Seat MRP Show Room Price Rate Star
Acura|MDX|SUV|Asia|All|$36,945|$33,337|3.5|
Acura|RSX Type S 2dr|Sedan|Asia|Front|$23,820|$21,761|2|

Those data have delimiter value of |

Expected result as

 

Result
Car Make  Model    Type   Origin  Seat      MRP      Show Room Price Rate Star
Acura        MDX      SUV    Asia    All         $36,945  $33,337                  3.5
Acura        RSK      Sedan   Asia  Front      $23,820 $21,761                    2

4 REPLIES 4
manilara44
Calcite | Level 5

Can u help me with code of real data of mine? i want code for import and input file statement too?

Reeza
Super User

Save your data to a text file. 

Use PROC IMPORT on that text file. 

The code you need will be in the log and you can customize it as needed.

 

Otherwise, follow the instructions here, example 5 specifically.

https://stats.idre.ucla.edu/sas/modules/inputting-data-into-sas/

PaigeMiller
Diamond | Level 26

All you have to do in the example is change the & to |

--
Paige Miller

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 681 views
  • 0 likes
  • 3 in conversation