@IrynaDemko wrote:
I want ParkName to have 30 characters in the proc import statement while Guessingrows sets it to 24. The log says that the format statement is not supported.
proc import datafile="s:\workshop\data\np_traffic.csv"
dbms = csv
out = pg1.traffic replace;
guessingrows=max;
format ParkName $30.;
run;
Thanks!
The length of 24 is the longest value encountered in this data set for the variable.
Changing the forrmat only effects display. If there are only 24 characters that's all there are. You would have to change the
INFORMAT to get 30 as the length and you can't do that with Proc Import.
When you use Proc Import you are in effect telling SAS to follow some arbitrary generic rules for determining variable properties and those rules will get things other than desired sometimes (or often in the case of some file formats) and based on the actual values encountered. If you want to have consistent results for multiple sets then do not rely on Proc Import.