When the SET Destination is Alpha


Formatting characteristics

The data dictionary record for an alpha destination field contains formatting characteristics that affect the results of the SET statement. These characteristics include justification, pad character, and word wrap.

Source alpha

Alpha source fields require no conversion before the beginning of the copying operation.

Source date

The destination field is set to blank if the date is null or blank; otherwise, it is set to 16 digits representing century, year, month, etc. If necessary, the destination is padded with blanks. A non-recoverable error occurs if the destination is less than 16 characters long.

Source dates are converted to an intermediate Gregorian alpha date form before the copy operation, with a mask value of 0807060504030201.

Source number

The source is converted from its packed or binary form into an intermediate alpha form before the copy operation. The intermediate alpha form is in the format xxxxxxxx.yyy-, with the number of x and y digits, and the existence of the sign, determined by the source field. If the source field is null, the intermediate alpha form is set to blank. If the converted value is too large to fit in the destination, it is truncated. You can use the CNV TEXT statement if formatting is desired.

Source logic

If the value of the source field is 1 (yes), the destination field is set to a value of Y. If the value of the source field is 0 (no), the destination field is set to a value of N. If the value of the source is blank, the destination field is set to blank.