BookmarkSubscribeRSS Feed
billoconnor989
Calcite | Level 5

Hi,

 

I am importing a regular CSV into Base SAS.  Have done this many times,  however this time whilst importing I have a full blank cells in one column that is completely populated in my CSV.

 

I have never seen this before and completely out of ideas what may be wrong

 

 

3 REPLIES 3
Kurt_Bremser
Super User

Do you use proc import? If yes, don't be surprised.

 

Anyway, look at the log for suspicious messages.

 

If that does not give you a clue, post a sample of your file, and your log (use the {i} button for both). If the log is overlong because of many messages, reduce to a representative sample .

billoconnor989
Calcite | Level 5

I do use proc import.  Can you suggest a better method?  I will investigate the log.  Thanks for your help

Kurt_Bremser
Super User

Use proc import on a file where the import worked. Copy the data step (proc import creates one and runs it) from the log, and apply it to the current file. Study the log in case the result is not what you expected.

Once it works, you can simplify and optimize this data step. The proper way to reliably read text files into SAS is always a customized data step.

sas-innovate-white.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.

 

Early bird rate extended! Save $200 when you sign up by March 31.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 613 views
  • 0 likes
  • 2 in conversation