SIZE

The SIZE function returns an integer representing the size of a specified object, exclusive of any pad characters.

Syntax:
SIZE (single-object-expression )
Meaning:
SIZE (object_whose_size_is_needed )
Returns:
A single integer

The SIZE function returns the size, in bytes, of object_whose_size_is_needed. The byte size returned does not include any pad characters that might be in the object, but does include separators and signs.

The size of a group is the size, beginning with the first character of the first component and ending with the last character of the last component, of the group. If the group has delimiters, the infix delimiters are included in the size.

Examples

  • SIZE ( Transaction )

    Returns 8000 if the size of Transaction (without pad characters) is 8000 bytes

Using SIZE with NORMXML

If the SIZE function is used with the NORMXML function to determine the size of the specified object after NORMXML has removed the XML formatting from the input XML fragment, the SIZE operation calculates the size of the data in Unicode, since the NORMXML function converts the input data to Unicode before it removes the XML formatting. The returned size does not match the size that would have been calculated if the data remained in its original character set, unless the original character set was Unicode.