GRDLIN (Grid Line) keyword

Use this record-level keyword to define the shape, positioning, and attributes for the line structure. This keyword defines whether the line is erased, display, or not processed.

The format of the keyword is:
GRDLIN((*POS([*DS3] [*DS4]
start line | &start-line-field
start column | &start-column-field
length | &length-field
[(*TYPE type of line
[repeat | &repeat-field]
[interval rule | &interval-field])]
[(*COLOR color of line | &color-field)]
[(*LINTYP type of line | &lintyp-field)]
[(*CONTROL | &control-field)]

The *POS parameter is a required parameter. This parameter allows display size and conditioning of the GRDLIN keyword. Coding *DS3 or *DS4 with the *POS parameter, you can have 2 different start row, start column, and length values depending on the display size being used. DSPSIZ keyword must be coded on the file level.

If a field name is specified, the field must exist in the record format, data type S, usage P, length of 3, and zero decimal positions.

The type parameter is a required parameter. The valid values for the type parameter are:
Value
Meaning
UPPER
Horizontal line on the upper character border
LOWER
Horizontal line on the lower character border
RIGHT
Vertical line on the right character border
LEFT
Vertical line on the left character border

The repeat parameter specifies the number of times the line is to be repeated. The interval parameter specifies the number of character spaces between the repeated lines.

The default for the type parameter is upper. If neither the repeat value nor the interval value is coded, a single grid line is drawn. The repeat and interval defaults are 1.

If a field name is specified, the field must exist in the record format and must be defined as data type S, usage P, and length greater than 3.

The *COLOR and *LINTYP parameter defines the color and attributes of the box. P-fields can be used to define or change the attributes at run time.

For more information about the *COLOR and *LINTYP parameter, see the GRDATR (Grid Attribute) keyword topic.

If NONE is defined by the GRDLIN keyword, the color set by the GRDATR keyword will be used.

If a p-field is specified for either the COLOR or LINTYP parameter, the field must exist in the record format. The field is defined as data type A, usage P, and length of 1.

The *CONTROL parameter specifies the whether the GRDLIN is to be displayed, erased from the screen, or ignored (similar to optioning off the keyword). The field must exist in the record format and must be defined as data type S, usage P, and length of 1. If the p-field is set to 0, the grid line will be displayed. If the p-field is set to 1, the GRDLIN keyword will not be processed. If the p-field is set to -1, the grid line record currently shown will be cleared. If the p-field is set to something other than the defined values, then the default 0 will be used.

Grid line support requires DBCS equipment. This equipment should have the capability of calling Japanese DOS.

Option indicators are valid for this keyword.

Example

The following example shows how to specify the GRDLIN keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A                                      DSPSIZ(*DS3 *DS4)
     A                                      GDRATR((*COLOR WHT) (*LINTYP SLD))
     A          R GRDREC1                   GRDRCD
     A                                      DSPMOD(*DS4)
     A                                      GRDLIN((*POS (*DS3 2 1 80) +
     A                                      (*DS4 2 1 132)) (*TYPE LOWER))
     A                                      GRDLIN((*POS (*DS3 4 6 20) +
     A                                      (*DS4 4 6 22)) (*TYPE RIGHT 4 15) +
     A                                      (*COLOR RED)  (*LINTYP DBL) +
     A                                      (*CONTROL &CNTL1));
     A
     A                                      GRDLIN((*POS (8 1 &LEN1); +
     A                                      (*TYPE LOWER 3 6) +
     A                                      (*COLOR &CLR1); (*LINTYP &LNTP1); +
     A                                      (*CONTROL &CNTL2));
     A            CNTL1          1S 0P
     A            CNTL2          1S 0P
     A            LEN1           3S 0P
     A            LNTP1          1A  P
     A            CLR1           1S 0P
     A
When the GRDREC1 record is written:
  • If record is written to a 24 by 80 display or DSPMOD is turned off, then:
    1. A horizontal line is drawn on the bottom character edge starting at row 2 and column 1. The length of the line is 80 columns long. The lines of the grid are white in color and have a solid line type defined by the file-level GRDATR keyword.
    2. If the value in the p-field CNTL1 equals 0, 4 vertical lines are drawn on the right border of characters in column 6, 21, 36, and 51. Each line is 20 rows long. The grid line is red using double lines. If the p-field CNTL1 value is a -1, the box is erased. If the p-field CNTL1 value is a 1, no action is taken by the GRDLIN keyword.
    3. If the value in the p-field CNTL2 equals 0, 3 horizontal lines are drawn at the bottom character edge of rows 8, 14, and 20. The length of the lines is determined at run time from the value in the p-field LEN1. If the value in that p-field is greater than the width of the display, the value is truncated to the display width. The color and line value is determined at run time from the p-field CLR1 and LNTP1. If the p-field CNTL2 value is 1, no action is taken by the GRDLIN keyword.
  • If record is written to a 27 by 132 display and DSPMOD is turned on, then:
    1. A horizontal line is drawn on the bottom character edge starting at row 2 and column 1. The length of the line is 132 columns long. The lines of the grid are white in color and have a solid line type defined by the file-level GRDATR keyword.
    2. If the value in the p-field CNTL1 equals 0, 4 vertical lines are drawn on the right border of characters in column 6, 21, 36, and 51. Each line is 22 rows long. The grid line is red using double lines. If the p-field CNTL1 value is a -1, the box is erased. If the p-field CNTL1 value is a 1, no action is taken by the GRDLIN keyword.
    3. If the value in the p-field CNTL2 equals 0, 3 horizontal lines are drawn at the bottom character edge of rows 8, 14, and 20. The length of the lines is determined at run time from the value in the p-field LEN1. If the value in that p-field is greater than the width of the display, the value is truncated to the display width. The color and line value are determined at run time from the p-field CLR1 and LNTP1. If the p-field CNTL1 value is a -1, the box is erased. If the p-field CNTL2 value is 1, no action is taken by the GRDLIN keyword.