Use this record-level keyword to define the shape, positioning, and attributes for the box structure. This keyword defines whether the box is erased, displayed, or not processed.
The format of the keyword is:
GRDBOX((*POS ([*DS3] [*DS4] start-row | &start-row-field start-column | &start-column-field depth | &depth-field width | &width-field)); [(*TYPE type of box [horizontal rule | &hrule-field] [vertical rule | &vrule-field])] [(*COLOR color of box | &color-field)] [(*LINTYP line type of box | &lintyp-field)] [(*CONTROL | &control-field)]
The *POS parameter is a required parameter. This parameter describes the position and size of the box. When coding *DS3 or *DS4 within 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.
The *TYPE parameter is a required parameter. The horizontal and vertical rule values define the number of character spaces between each rule. For example, if a *TYPE VRT box is defined with a width of 21 columns and a rule value of 3 columns, there will be 6 vertical lines within the box. If the rule value is not an even multiple of the width or depth, the odd space rule will occur at the right side or the bottom of the box. The default for this parameter is PLAIN.
The horizontal or vertical rule values can be defined using program-to-system fields. If a field name is specified, the field must exist in the record format. The field is defined as a data type S, usage P, field length of 3, and zero decimal positions.
The *COLOR and *LINTYP parameters define 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 GRDBOX 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 whether this GRDBOX 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 GRDBOX 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.
The following example shows how to specify the GRDBOX keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A DSPSIZ(*DS3 *DS4) A GDRATR((*COLOR WHT) (*LINTYP SLD)) A R GRDREC1 GRDRCD A GRDATR((*COLOR BLU) (LINTYP DSH)) A GRDBOX(*POS (2 5 10 70 ) (*TYPE PLAIN)) A A R GRDREC2 GRDRCD A 90 DSPMOD(*DS4) A GRDBOX((*POS (*DS3 5 5 18 70) + A (*DS4 5 5 19 120)) (*TYPE PLAIN)) A GRDBOX((*POS (*DS3 5 5 18 70) + A (*DS4 7 7 3 103)) (*TYPE VTR 10) + A (*CONTROL &CNTL1)); A A GRDBOX((*POS (*DS3 12 7 6 53) + A (*DS4 127 6 103)) + A (*TYPE HRZ 2) + A (*COLOR RED) (*LINTYP &LNTP1); + A (*CONTROL &CNTL2)); A A A 95 GRDBOX((*POS (&SCROW1 &SCOL1 &DPTH1 + A &WDTH1)); + A (*TYPE HRZVRT &HRUL1 &VRUL1); + A (*COLOR &CLR1); + A (*CONTROL &CNTL3)); A CNTL1 1S 0P A CNTL2 1S 0P A CNTL3 1S 0P A LNTP1 1A P A CLR1 1A P A SROW1 3S 0P A SCOL1 3S 0P A DPTH1 3S 0P A WDTH1 3S 0P A HRUL1 3S 0P A VRUL1 3S 0P A
When the GRDREC1 record is written, the plain box defined at position row 2, column 4, depth of 10 rows, and width of 70 columns will be displayed. The box will have a color of blue with dash lines.