Help using Base SAS procedures

Importing .csv File with Embedded NULL

Reply
Occasional Contributor
Posts: 19

Importing .csv File with Embedded NULL

I have a .csv file that I'm trying to read in. The problem is that every other byte appears to be a NULL (char value = 00). The best solution I have is using the compress function to take the NULLs out. This isn't the first time my "data experts" have given me a file like this and I suspect that it is due to a decryption process that they use.

My question is this, is there a easier or slicker way of ignoring the bad bytes or am I doomed to repeat this exercise over and over again?
Respected Advisor
Posts: 3,799

Re: Importing .csv File with Embedded NULL

Posted in reply to CurlerBob
Sounds like you have a UNICODE file. Look at the ENCODING option on the INFILE or FILENAME statement.
Occasional Contributor
Posts: 19

Re: Importing .csv File with Embedded NULL

Posted in reply to data_null__
Thanks. That worked great!
Ask a Question
Discussion stats
  • 2 replies
  • 246 views
  • 0 likes
  • 2 in conversation