Error possible with large difference between variable length andformatted width in PROC SURVEYMEANS


If a character variable on the VAR statement in PROC SURVEYMEANS has a formatted width that is much longer or much shorter than its length, the procedure may terminate abnormally with an error such as:

ERROR: Read Access Violation In Task [ SURVEYMEANS )

or the procedure may complete without error but include garbage characters appended to the variable level values in the output. Either situation is uncommon and will not occur every time there is a discrepancy between the variable's formatted width and length .

To circumvent this problem, use an appropriate FORMAT or LENGTH statement to ensure the formatted width and length of the analysis variable are the same.