FIX Function
Returns a fixed-length string of 20, 40, 60, or 80 characters.
idmscu19
Returns a fixed-length string of 20, 40, 60, or 80 characters.
Multiple detail lines can be produced using this string function.
Syntax
►►─┬─ FIX20 ─┬─ (string) ───────────────────────────────────────────────────►◄ ├─ FIX40 ─┤ ├─ FIX60 ─┤ └─ FIX80 ─┘
Parameters
- stringSpecifies the string value on which the fix function is performed.Stringcan be:
- A string literal, enclosed in single quotation marks
- The name of a user-defined variable data field containing the string
Example
In the following example, the fix function is used to produce a formatted address list:
Statement: MOVE FIX40(CONCAT(EXT(EMP-FIRST-NAME), ' ', EXT(EMP-LAST-NAME))) TO WK-FIX-NAME. MOVE FIX40(EMP-STREET) TO WK-FIX-ADDR1. MOVE FIX40(CONCAT(EXT(EMP-CITY), ', ', EXT(EMP-STATE), ' ', EXT(EMP-ZIP))) TO WK-FIX-ADDR2. Returned string: 'JOHN RUPEE ' '114 WEST INDIA ST ' 'METHUEN, MA 02312 '