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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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