LINE (Line) Keyword in Printer Files

Use this record-level keyword to print a horizontal or vertical line.

The format of the keyword is:

LINE(position-down | &position-down-field
position-across | &position-across-field
line-length | &line-length-field
line-direction
line-width | &line-width-field
[line-pad])

The position-down parameter is required and defines the vertical starting point of the line relative to the margins specified on the FRONTMGN or BACKMGN parameter on the CRTPRTF command. Valid values are 0 to 57.790 cm (0 to 22.750 in.).

The position-across parameter is required and defines the horizontal starting point of the line relative to the margins specified on the FRONTMGN or BACKMGN parameter on the CRTPRTF command. Valid values are 0 to 57.790 cm (0 to 22.750 in.).

You can specify the position-down and position-across parameters as constants, program-to-system fields, or a combination of both, as shown in the following:

Field1, field2, field3, and field4 are the names of program-to-system fields. The fields must exist in the same record format as the LINE keyword and be defined as having length 5 with 3 decimal positions, data type S (zoned decimal), and usage P (program-to-system).

The line-length parameter is required and defines the length of the line. Valid values are 0.001 to 57.790 cm (0.001 to 22.750 in.). The parameter can be a program-to-system field. The field must exist in the same record format as the LINE keyword and be defined as having length 5 with 3 decimal positions, data type S (zoned decimal), and usage P (program-to-system).

The line-width parameter is required and defines the width of the line. Valid values are 0.001 to 57.790 cm (0.001 to 22.750 in.). The parameter can be a program-to-system field. The field must exist in the same record format as the LINE keyword and be defined as having length 5 with 3 decimal positions, data type S (zoned decimal), and usage P (program-to-system). Instead of a numeric value or program-to-system field, the following special values can also be specified:

Value
Line Width

*NARROW
12/1440 in. (0.008 in., 0.022 cm)

*MEDIUM
24/1440 in. (0.017 in., 0.042 cm)

*WIDE
36/1440 in. (0.025 in., 0.064 cm)

Notes:

  1. The UOM parameter on the CRTPRTF command determines the units of measure for the position-down, position-across, line-length, and line-width parameter values. If the value specified for a parameter is outside the valid range, it is flagged when the spooled file is created.

  2. Depending on printer hardware, lines smaller than approximately 0.004 in. (0.010 cm) might not print because of printer resolution. No message is issued when this occurs.

The line-direction parameter is required and can have a value of horizontal (*HRZ) or vertical (*VRT).

The line-pad parameter is optional. It specifies where the line-width value is placed in relationship to the actual line coordinates. For example, if line-width is 5 and line-pad is *TOP, the line extends above the point identified by the position-across and position-down parameters. Valid values are *TOP and *BOT for *HRZ lines, and *LEFT and *RIGHT for *VRT lines. The defaults are *BOT for horizontal lines and *RIGHT for vertical lines.

When the LINE keyword is specified on a record format, all fields within the record format must be positioned using the POSITION keyword. See POSITION (Position) Keyword in Printer Files for more information.

An error message is issued if a constant field is specified in a record format where the LINE keyword is also specified.

An error message is issued at print time if the line does not fit on the page.

Specify DEVTYPE(*AFPDS) on the CRTPRTF command when LINE is specified in the file. If DEVTYPE is changed to anything other than *AFPDS, the keyword is ignored and a warning message is issued at print time.

You can specify this keyword a maximum of 40 times on a record.

You cannot specify LINE with the following keywords:

SPACEA

SPACEB

SKIPA

SKIPB

Note:
Feature PSF/400 is required for use of this keyword. If PSF/400 is not installed, you will not be able to print files using this keyword and specifying DEVTYPE(*AFPDS).

Option indicators are valid for this keyword.