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
SAS Super FREQ
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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 581 views
  • 0 likes
  • 2 in conversation