BookmarkSubscribeRSS Feed
kumarK
Quartz | Level 8

I have a data set which has address column.

While importing it is truncating.how to handle this situations.

7 REPLIES 7
Patrick
Opal | Level 21

Provide much more information to us - and if you're lucky then while collecting this information you might even understand by yourself what's happening and how to resolve it.

ballardw
Super User

Did you use proc import? If so what was the source file type?

You can search this forum for truncated and you'll find a number of related posts, especially if the data source is Excel.

kumarK
Quartz | Level 8

it's a csv file. i am importing through proc import. Yes i will search in this group. Thanks.

what are the differences(adv and dis adv) in Proc import and  infile. which one is best to use.

RamKumar
Fluorite | Level 6

Again you can find numerous answers if you search in this forum like 'differences between infile and proc import' or simply 'proc import'

Kurt_Bremser
Super User

PROC IMPORT makes an educated guess about the file structure and then creates a suitable data step to read the data.

This means that a change in the file structure (or the data in the first n records inspected by proc import) will result in an automatic structural change in the dataset, which may cause problems farther down the line.

A manually written DATA step to read an external file will show unexpected data, either by causing a WARNING or ERROR condition, or at least by writing ERROR messages to the log. This will enable you to catch faulty data before it causes serious trouble.

Chrishi
Calcite | Level 5

use guessingrows=32767 for proc import and give a try.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Clue is in the title there, guessingrows.  If your ok with letting SAS guess your data then go ahead, I would recommend writing a specific import program yourself for the data you know.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 7 replies
  • 1017 views
  • 2 likes
  • 7 in conversation