Hello everyone,
I am importing a csv file in sas and one of the observations include data like Datsun_715
when i am importing such mixed data in sas it is only reading Datsun_
and that 715 is not getting read.
what to do? please suggest?
Most probably the variable is defined with too short length.
If you used proc import, copy the data step from the log and adapt it.
what if i redefine the length of the corresponding variable?
@atulsingh wrote:
what if i redefine the length of the corresponding variable?
If the variable has already been read incorrectly changing the length won't change the underlying value.
Another fix for an 'incorrect' import from CSV Is to make the GUESSINGROWS option big - as large a the file. This means it scans the entire column before deciding on a length and format.
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.
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.