WINPRINT-SET-CURSOR
The WINPRINT-SET-CURSOR function changes the cursor position in the current report page.
The subsequent WRITE statement must specify the WITH NO CONTROL clause.
Syntax:
 CALL "WIN$PRINTER" USING WINPRINT-SET-CURSOR
                          WINPRINT-DATA
                   GIVING returnCode
Parameters:
WINPRINT-SET-CURSOR
Constant
 
WINPRINT-DATA
Group Item
Structure that contains the cursor position to be set and returns the previous cursor position. This group item, defined in isprint.def, has the following structure:
 
01  winprint-data.
    03 wprtdata-draw.
       05 wprtdata-draw-start-x     pic 9(7)v99 comp-5.
       05 wprtdata-draw-start-y     pic 9(7)v99 comp-5.
       05 wprtdata-draw-stop-x      pic 9(7)v99 comp-5.
       05 wprtdata-draw-stop-y      pic 9(7)v99 comp-5.
       05 wprtdata-draw-units       unsigned-short.
       05 wprtdata-draw-shape       unsigned-short.
wprtdata-draw-start-x
Specifies the horizontal coordinate of the cursor location. The position refers to the physical left margin.
wprtdata-draw-start-y
Specifies the vertical coordinate of the cursor location. The position refers to the physical top margin.
wprtdata-draw-stop-x
It returns the horizontal coordinate of the current cursor location. The position refers to the physical left margin.
wprtdata-draw-stop-y
It returns the vertical coordinate of the current cursor location. The position refers to the physical top margin.
wprtdata-draw-units
Specifies the unit of measure for the coordinates. Valid values are:
WPRTUNITS-CELLS
Values are expressed in cells.
WPRTUNITS-INCHES
Values are expressed in inches.
WPRTUNITS-CENTIMETERS
Values are expressed in centimeters.
WPRTUNITS-PIXELS
Values are expressed in pixels.
wprtdata-draw-shape
It is a flag that specifies if the cursor position must be changed or not.
 
When it is set to zero, the function will change the cursor position.
 
When it is set to a non-zero value, the function will not change the cursor position. Use this setting to retrieve the current cursor location.
Return code:
returnCode can be any signed numeric data item and provides additional information:
1
Operation successful.
WPRTERR-UNSUPPORTED
The WIN$PRINTER library routine is not supported.
WPRTERR-BAD-ARG
The WIN$PRINTER library routine has been called with bad parameters.