Numeric normalization is preventable. The CHAR operator explicitly designates a variable's type as character. This prevents
suppression of leading zeros. The same two examples are shown below to demonstrate where CHAR is necessary. Examples 1
A 6-byte inbound data element of type DT mapped to a 6-byte application field of type DT:(input data value of "000101")
&SAVE variable &FORCE &E(CHAR(variable)) (output data value of "000101") Note: An alternative solution is to employ &USE instead:
&SAVE variable &USE variable Example 2 An 8-byte inbound data element of type DT mapped to a 6-byte application field of type DT:(input data value of "000101")
&SAVE variable &SET variable2 &E(variable FD 'CCYYMMDD' TD 'YYMMDD') &FORCE &E(CHAR(variable2))
(output data value of "000101") Note:
An alternative solution is to eliminate the &SET statement. That is, directly force the result of the expression which is performing the FD/TD operation: &SAVE variable
&FORCE &E(variable FD 'CCYYMMDD' TD 'YYMMDD') |