Use this record-level keyword to print a rectangle.
The format of the keyword is:
BOX(first-corner-down | &first-corner-down-field first-corner-across | &first-corner-across-field diagonal-corner-down | &diagnonal-corner-down-field diagonal-corner-across | &diagnonal-corner-across-field line-width | &line-width-field);
The first-corner-down, first-corner-across, diagonal-corner-down, and diagonal-corner-across parameters define the diagonal corners of the box. All are required parameters.
You can specify the corner position parameters as constants, program-to-system fields, or a combination of both, as shown in the following:
BOX(1.2 0.5 5.1 6.3 0.2)
BOX(1.2 &field2 5.1 &field4 0.2)
BOX(&field1 &field2 &field3 &field4 0.2)
The first-corner-down parameter defines the vertical starting point of the BOX relative to the margins specified on the FRONTMGN or BACKMGN parameter of the CRTPRTF command. Valid values are 0 to 57.790 cm (0 to 22.750 in.).
When you specify the first-corner-down parameter as a program-to-system field, the field must exist in the same record format as the BOX keyword. It must be defined as length of 5 with 3 decimal positions, data type S (character), and usage P (program-to-system).
The first-corner-across parameter defines the horizontal starting point of the BOX relative to the margins specified on the FRONTMGN or BACKMGN parameter of the CRTPRTF command. Valid values are 0 to 57.790 cm (0 to 22.750 in.).
When you specify the first-corner-across parameter as a program-to-system field, the field must exist in the same record format as the BOX keyword. It must be defined as length of 5 with 3 decimal positions, data type S (character), and usage P (program-to-system).
The diagonal-corner-down parameter defines the vertical end point of the BOX relative to the margins specified on the FRONTMGN or BACKMGN parameter of the CRTPRTF command. Valid values are 0 to 57.790 cm (0 to 22.750 in.).
When you specify the diagonal-corner-down parameter as a program-to-system field, the field must exist in the same record format as the BOX keyword. It must be defined as length of 5 with 3 decimal positions, data type S (character), and usage P (program-to-system).
The diagonal-corner-across parameter defines the horizontal end point of the BOX relative to the margins specified on the FRONTMGN or BACKMGN parameter of the CRTPRTF command. Valid values are 0 to 57.790 cm (0 to 22.750 in.).
When you specify the diagonal-corner-across parameter as a program-to-system field, the field must exist in the same record format as the BOX keyword. It must be defined as length of 5 with 3 decimal positions, data type S (character), and usage P (program-to-system).
The line-width parameter is required and defines the width of the lines. Valid values are 0.001 to 57.790 cm (0.001 to 22.750 in.). The following special values can also be specified:
When you specify the line-width parameter as a program-to-system field, the field must exist in the same record format as the BOX keyword. It must be defined as length of 5 with 3 decimal spaces, data type S (character), and usage P (program-to-system). The special values of *NARROW, *MEDIUM, or *WIDE can not be specified using a program-to-system field.
Notes:
The line width is drawn on the inside of the box.
When the BOX 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 BOX keyword is also specified.
An error message is issued at application run time if the box extends beyond the page boundaries.
Specify DEVTYPE(*AFPDS) on the CRTPRTF command when BOX 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 multiple times on a record.
You cannot specify BOX with the SPACEA, SPACEB, SKIPA, or SKIPB keywords.
Option indicators are valid for this keyword.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.