The new compiler will flag any string assignment where the source has a known length, the target has a known maximum length, and the source length is greater than the maximum target length. Unfortunately, this will cause the compiler to flag even those assignments where the trailing bits or characters are "uninteresting".
The compiler option RULES(LAXSTRZ) can help reduce this "noise": under RULES(LAXSTRZ), no message will be issued in an initial clause or an assignment if :
Consequently, under RULES(LAXSTRZ), only the second of the following statements would be flagged:
dcl a char(4) init('ok ');
dcl b char(4) init('error');The default option is RULES(NOLAXSTRZ), but using RULES(LAXSTRZ) might give you better quality by letting you focus on the truly problematic assignments.