Retrieval assignment

In COBOL, the length of a string that is assigned to a host variable can be greater than the length attribute of the variable. When the length of the string is greater than the length of the variable, the string is truncated on the right by the necessary number of characters.

When truncation occurs, the value W is assigned to the SQLIMSWARN1 field of the SQLIMSCA.

When a character string is assigned to a fixed-length variable and the length of the string is less than the length attribute of the target, the string is padded to the right with the necessary number of blanks.