Specifying lengthIntegerExpression is optional. If you include it, the utility pads the substring on the right with the necessary number of characters to satisfy the length criteria. The product uses the pad character for the current table.
The varying attribute of the result substring depends on lengthIntegerExpression. If you omit lengthIntegerExpression, the varying attribute of the substring is the same as stringExpression, and the length of the result substring is the same as the source string.
If lengthIntegerExpression is a constant with a value of 255 or less, the resulting substring is a fixed character or graphic string of the specified length. If lengthIntegerExpression is not a constant the resulting substring is a varying character or graphic string with the same maximum length as stringExpression.