Output record relative positioning

File Manager 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, File Manager 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.

Example

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.

FASTREXX:
SET_OLEN( 0 )
OVLY_OUT('First name: ')
FLD_OUT(31,20)
OVLY_OUT('Last name: ',P5)  /* Skips 5 bytes, filled by PAD character */
FLD_OUT(1,30)