The SAS Output Delivery System and reporting techniques

Infile Format Question -Pipe delimtied file

Reply
N/A
Posts: 0

Infile Format Question -Pipe delimtied file

infile "O:\Raw Data Extracts\Client.txt" recfm=v dsd dlm='|' pad missover LRECL=1100 firstobs=1;

I am trying to import a file to SAS; it is a text file in a pipe delimited format. Though I am using dsd function it truncates 2 pipes as one pipe example

Firstname|Lastname|City|PostalCode|Country
Gautam|Mohorikar|Toronto||Canada

Here If I import this file with the dsd statement, Canada will appear in the PostalCode column.

But if this file was a comma delimited file the dsd function works well see the below command.

infile "O:\Customer Knowledge\Client Information\Client.txt" recfm=v dsd dlm=',' pad missover LRECL=1100 firstobs=1;


I hope you guys can help.

Thx,

Gautam
SAS Super FREQ
Posts: 8,862

Re: Infile Format Question -Pipe delimtied file

Posted in reply to deleted_user
Hi!
This is really not an ODS-related question. Your best bet for help with DATA step statements for INFILE and INPUT is Tech Support. To learn how to contact Tech Support, consult:
http://support.sas.com/techsup/contact/index.html

Good luck!
cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 130 views
  • 0 likes
  • 2 in conversation