POSITION

Basic form

POSITION col.

Effect

The contents of the field col sets the output position (column) of the subsequent WRITE statement.

Notes

Example

The routine LINEOUTPUT has three input parameters - COLUMN, LENGTH and CHAR. Starting from COLUMN, it outputs a line comprising the character CHAR with the length LENGTH:

FORM LINEOUTPUT USING COLUMN LENGTH CHAR.
  DATA LINEPOS TYPE P.
  LINEPOS = COLUMN.
  DO LENGTH TIMES.
    POSITION LINEPOS. WRITE CHAR.
    ADD 1 TO LINEPOS.
  ENDDO.
ENDFORM.

If you call the above FORM with

PERFORM LINEOUTPUT USING 5 10 '='.

Output:
     ==========

Related

WRITE ... AT, WRITE ... UNDER

Additional help

Absolute Position Definition