Wellyopolis

January 2, 2007

Width specified for format X is invalid

File this under entries I write for other people googling for the same problem I had ... and of no interest to most readers.

In SAS when writing out a file when you are PUTting the character variables you do it like this:
<variable-name> <begin-column> - <end-column>

If you happen to spell a variable's name incorrectly, say you put "ANMN" instead of "ANM" (for semi-obvious reasons I often type "N" after "M") the error message returned will be something like this
"Width specified for format F is invalid"
rather than something like
"ERROR: <variable-name> does not exist."
which would be more informative.

Spelling errors corrected the file wrote out correctly, but not after spending 10 minutes wondering which basically unformatted variable was formatted incorrectly.

Posted by eroberts at January 2, 2007 3:48 PM