BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
1 REPLY 1
Cynthia_sas
Diamond | Level 26
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

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

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
  • 1 reply
  • 870 views
  • 0 likes
  • 2 in conversation