MQCHARn (String of n characters) on IBM® i
Each MQCHARn data type represents a string of n characters.
Where n can take one of the following values:- 4, 8, 12, 16, 20, 28, 32, 48, 64, 128, or 256
Each character is described by the MQCHAR data type. No special alignment is required.
If the data in the string is shorter than the defined length of the string, the data must be padded with blanks to fill the string. In some cases a null character can be used to end the string prematurely, instead of padding with blanks; the null character and characters following it are treated as blanks, up to the defined length of the string. The places where a null can be used are identified in the call and data type descriptions.
When the queue manager returns character strings to the application (for example, on the MQGET call), the queue manager always pads with blanks to the defined length of the string; the queue manager does not use the null character to delimit the string.
Constants are available that define the lengths of character string fields.