Output record relative positioning

Z Data Tools maintains an internal "current position" in the output record, and also sets the value in the REXX variable, OUTPOS. After any operation that modifies the output record, Z Data Tools resets the value in OUTPOS to point to the next byte position after the most recent change to the output record. By using the value held in OUTPOS, you can easily append fields to the output record.


Rearrange the input record fields in the output record. The first step is to "clear" the output record by setting its length to zero. Then fields and constants are appended to the output record. The only field and length references needed are in the input record. When no reference is made to an output position, it defaults to the current output position.

OVLY_OUT('First name: ')
OVLY_OUT('Last name: ',P5)  /* Skips 5 bytes, filled by PAD character */