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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 988 views
  • 0 likes
  • 3 in conversation