ERROR 29-185: Width Specified for format —- is invalid

This post was kindly contributed by StudySAS Blog - go there to comment and to read the full post.


You see “ERROR 29-185: Width Specified for format —-  is invalid” message in the log file  when you try to specify the DATE format but used an invalid width. DATE format will not result in a date if it is too long or too short. Valid values are 5-9 in SAS 9.1.X versions. If you use newer version (SAS 9.2) then you won’t see this Error message in the log. ( I am assuming that this is fixed in SAS 9.2).

Try using format date9. instead of date11. if you are using SAS 9.1.x (either Windows or Unix) version.

data _null_;

date =’23-SEP-2004’d;

put date date11.;*this statement gives you error in SAS 9.1.2/9.1.3 versions;

put date date9.;

run;

[[ This is a content summary only. Visit my website for full links, other content, and more! ]]

This post was kindly contributed by StudySAS Blog - go there to comment and to read the full post.