DDS Display Files--DBCS Considerations

This section describes the DBCS considerations for the positional entries and keyword entries for display files.

DDS Positional Entry Considerations

The following section describes, by position, DDS for describing display files. Positions not mentioned have no special considerations for DBCS.

DDS Length (Positions 30 through 34)

Specify the length of the field in these positions. The length of a field containing bracketed-DBCS data can range from 4 through 32 763 bytes. The length of a DBCS-graphic field can range from 1 through 16 381 characters.

When determining the length of a DBCS field, consider the following:

For example, a bracketed-DBCS field that contains up to 3 DBCS characters, 1 shift-in character, and 1 shift-out character, has 8 bytes of data:

(3 characters x 2 bytes) + (shift-out + shift-in) = 8

A DBCS-graphic field that contains up to 3 DBCS characters has 6 bytes of data:

(3 characters x 2 bytes) = 6

DDS Data Type (Position 35)

Specify the data type in this position by typing one of the following:

J (Only)
Type J to specify this field as a DBCS-only field.

The display station automatically inserts shift-control characters in fields specified with this data type.

If you specify J, you must specify an even number for the field length (positions 30 through 34).

E (Either)
Type E to specify this field as a DBCS-either field.

You can type either DBCS or alphanumeric characters in the field. The type of data typed in the first position of the field determines the type of data that can be typed in the remainder of the field. If the field is empty, the system assumes that alphanumeric data will be typed in. To change the field so DBCS data can be typed, position the cursor in the field and put the keyboard in DBCS mode.

If the field contains DBCS data, the display station automatically inserts shift-control characters.

If you specify E, you must specify an even number for the field length (positions 30 through 34).

O (Open)
Type O to specify this field as a DBCS-open field. You can type both DBCS and alphanumeric characters in this field. Use shift-control characters to distinguish DBCS data from alphanumeric data.

If the field contains DBCS data, the system does not ensure that the data is enclosed between shift-control characters.

If you specify O, you can specify either an even or an odd number for the field length (positions 30 through 34).

G (Graphic)
Type G to specify this field as a DBCS-graphic field. Data typed in this field does not contain shift-control characters.

If you specify G, you must specify the number of DBCS characters for the field length (positions 30 through 34).

DDS Decimal Positions (Positions 36 and 37)

Leave these positions blank when using DBCS data.

DDS Keyword Considerations

Do not use the following DDS keywords with DBCS data fields (the data type specified in position 35 is J, E, O, or G):

AUTO(RAZ)
BLKFOLD
CHECK(M10)
CHECK(M10F)
CHECK(M11)
CHECK(M11F)
CHECK(RL)
CHECK(RLTB)
CHECK(RZ)
CHECK(VN)
CHECK(VNE)
CHRID
DATE
DLTEDT
DSPATR(OID)
DSPATR(SP)
EDTCDE
EDTWRD
FLTFIXDEC
FLTPCN
MSGCON
REFSHIFT
SFLMSGKEY
SFLPGMQ
SFLRCDNBR
SFLROLVAL
TIME

Do not use the CHECK(LC) and LOWER keywords on DBCS-only fields (J specified in position 35).

Do not use the IGCALTTYP, IGCANKCNV, CHECK(LC), and LOWER keywords on DBCS-graphic fields (G specified in position 35).

For additional information on the keywords for display files, refer to the keyword descriptions in Keywords for Display Files in DDS.

The following DDS keywords may be used in files containing DBCS data only when the function indicated by the keyword is available on the display device or with the type of data used. However, DDS does not apply record- and file-level keywords to DBCS fields.

CHECK(RL)
CHECK(RLTB)
COLOR
DSPSIZ(*DS4)
DSPATR(SP)
DSPMOD
ERASEINP(*ALL)
MDTOFF(*ALL)

The IGCALTTYP and IGCCNV keywords also can be used as described in DDS IGCALTTYP (Alternative Data Type) Keyword and DDS IGCCNV (DBCS Conversion) Keyword.

DDS CNTFLD (Continued-Entry Field) Keyword--DBCS Considerations

Use this field-level keyword to define a field as a continued entry field. Continued-entry fields are sets of associated entry fields that are treated by the work station controller as a single field during field-data entry and editing. If the display device is not attached to a controller that supports an enhanced interface for nonprogrammable work stations, each segment of the continued entry field is treated separately when editing is performed on the field.

The format of the keyword is:

CNTFLD(width of column)

One parameter must be specified.

For additional information on the CNTFLD keyword, refer to the keyword description in "CNTFLD (Continued-Entry Field) Keyword for Display Files".

DDS DBCS Considerations

DBCS data types will have the following restrictions:

J
The width of each continued-entry field segment must be an even number of at least 4 bytes.

E
The width of each continued-entry field segment must be an even number of at least 4 bytes.

O
The width of each continued-entry field segment must be at least 4 bytes wide.

G
The width of each continued-entry field segment must be an even number of at least 4 bytes.

Special consideration must be taken when defining the length of the DBCS continued-entry field to account for the SO/SI character pairs that must bracket the DBCS data on each segment of the continued-entry field. The following total field lengths are required to ensure the field data fits into DBCS continued-entry fields:

J or E (with DBCS data)
Data Length + (Number of segments - 1) * 2

O
Data Length + (Number of segments - 1) * 3

G or E (with SBCS data)
Data Length
Note:
The (Number of segments - 1) * 2 portion of the calculation in the first equation allows for the SO/SI sets that must bracket the DBCS data on the segments of the continued-entry field after the first segment.

The (Number of segments - 1) * 3 portion of the calculation in the second equation allows for the SO/SI sets that must bracket the DBCS data on the segments of the continued-entry field after the first segment. Additional consideration is made for the possibility that a NULL must be placed at the end of a segment wherever a DBCS character would be split.

Note:
WRDWRAP cannot be used on DBCS continued-entry fields.

DDS GRDATR (Grid Attribute) Keyword

Use this file- or record-level keyword to define the default color and line type attributes for the grid structure.

The format of the keyword is:

GRDATR([(*COLOR grid-line-color | &Color-field)]
[(*LINTYP grid-line-attribute | &Lintype-field)])

P-fields may be used to define or change the attributes at run time when this keyword is used at the record-level.

Valid parameter and p-fields values are:

Table 12. Valid color values

COLOR Meaning Program field value
BLU Blue X'01'
GRN Green X'02'
CYAN Cyan X'03'
RED Red X'04'
VLT Violet X'05'
YLW Yellow X'06'
WHT WHite X'07'
GRY Gray X'08'
LBLU Light blue X'09'
LGRN Light green X'0A'
LTRQ Light Turquoise X'0B'
LRED Light red X'0C'
LVLT Light violet X'0D'
LYLW Light yellow X'0E'
HWHT High-intensity white X'0F'
BLK Black X'10'
NONE Default value of the display X'FF'
Note:
The default color is white.

Table 13. Valid line types

Line Type Meaning Program field value
SLD Solid X'00'
THK Thick X'01'
DBL Double X'02'
DOT Dot X'03'
DSH Dash X'08'
THKDSH Thick dash X'09'
DBLDSH Double dash X'0A'
NONE Default value of the display X'FF'
Note:
The default line type is solid.

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.

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

Option indicators are valid for this keyword.

DDS GRDATR (Grid Attribute) Keyword--Example

Figure 450 shows how to specify the GRDATR keyword.

Figure 450. Specifying the GRDATR Keyword

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A                                      GRDATR((*COLOR WHT) (LINTYP SLD))
A          R GRDREC1                   GRDRCD
A                                      GRDATR((*COLOR BLU) (LINTYP DSH))
A                                      GRDBOX((*POS (2 2 10 70 )) +
A                                      (*TYPE PLAIN)
A
A          R GRDREC2                   GRDRCD
A                                      GRDBOX((*POS (4 4 5 45)) +
A                                      (*TYPE PLAIN)
A                                      GRDLIN((*POS (6 4 20)) +
A                                      (*TYPE LOWER) +
A                                      (*COLOR RED) (*LINTYP DBL))
A

When the GRDREC1 record is written, the TYPE PLAIN box defined by the GRDBOX keyword within the GRDREC2 record will be displayed with a blue dash lines. These attributes are defined on the GRDATR keyword on the GRDREC1 record.

When the GRDREC2 record is written, the TYPE PLAIN box defined by the GRDBOX keyword within the GRDREC2 record will be displayed with a white solid line. These attributes are defined on the GRDATR keyword at the file level. The GRDLIN defined within GRDREC2 will be a red double line. The attributes defined on the GRDBOX or GRDLIN keyword override any GRDATR keyword on the file- or record-level.

DDS GRDBOX (Grid Box) Keyword

Use this record-level keyword to define the shape, positioning, and attributes for the box structure. This keyword defines if 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; then 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 may 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 may be used to define or change the attributes at run time.

For more information on the *COLOR and *LINTYP parameter, see the GRTATR keyword "DDS GRDATR (Grid Attribute) Keyword".

If *NONE is defined by the GDRBOX 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 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.

DDS GRDBOX (Grid Box) Keyword--Example

Figure 451 shows how to specify the GRDBOX keyword.

Figure 451. Specifying 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.

When the GRDREC2 record is written, the following will appear:

DDS GRDCLR (Grid Clear) Keyword

Use this record-level keyword to define the rectangle on a screen in which all grid structures are cleared.

The format of the keyword is:

GRDCLR[(*POS ([*DS3][*DS4]
start row | &start-row-field
start column | &start-column-field
depth | &depth-field
width | &width-field))]

If no parameters are defined, GRDCLR keyword will clear all grid lines.

The *POS parameter is an optional parameter. This parameter display size conditioning on the GRDCLR keyword. 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.

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.

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

Option indicators are valid for this keyword.

DDS GRDCLR (Grid Clear) Keyword--Example

Figure 452 shows how to specify the GRDCLR keyword.

Figure 452. Specifying the GRDLIN Keyword

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A                                      DSPSIZ(*DS3 *DS4)
A
A          R GRDREC1                   GRDRCD
A                                      GRDCLR
A
A          R GRDREC2                   GRDRCD
A  90                                  DSPMOD(*DS4)
A
A  95                                  GRDCLR((*POS (*DS3 4 4 10 60) +
A                                      (*DS4 4 4 10 120)))
A
A                                      GRDLIN((*POS (*DS3 6 4 20) +
A                                      (*DS4 6 4 110)) (*TYPE LOWER)  +
A                                      (*COLOR RED) (*LINTYP DBL))
A
A          R GRDREC3                   GRDRCD
A
A  95                                  GRDCLR((*POS (&SCROW &SCOL &DPTH &WDTH)));
A
A                                      GRDLIN((*POS (6 4 20)) +
A                                      (*TYPE LOWER)  +
A                                      (*COLOR RED) (*LINTYP DBL))
A
A            SROW           3S 0P
A            SCOL           3S 0P
A            DPTH           3S 0P
A            WDTH           3S 0P
A

When the GRDREC1 record is written, the display screen is cleared of all grid structures.

When the GRDREC2 record is written to a 24 by 80 display or the DSPMOD keyword is optioned off and option indicator 95 is turned on, a rectangle starting at row 4, column 4, depth of 10 rows, and width of 60 columns will be cleared. If the GRDREC2 record is written to a 27 by 132 display and the DSPMOD keyword is optioned on and option indicator 95 is turned on, a rectangle starting a at row 4, column 4, depth of 10 rows, and width of 120 columns will be cleared. The GRDCLR keyword will be processed before the GRDLIN keyword so existing grids will be cleared before any new grids are drawn.

When the GRDREC3 record is written and option indicator 95 is turned on, the GRDCLR keyword is processed. The position and size of the rectangle for the GRDCLR keyword will be determined at run time from the appropriate p-field. The GRDCLR keyword will be processed before the GRDLIN keyword so existing grids will be cleared before any new grids are drawn.

DDS GRDLIN (Grid Line) Keyword

Use this record-level keyword to define the shape, positioning, and attributes for the line structure. This keyword defines if 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 define the color and attributes of the box. P-fields may be used to define or change the attributes at run time.

For more information on the *COLOR and *LINTYP parameter, see the GRTATR keyword "DDS GRDATR (Grid Attribute) Keyword".

If NONE is defined by the GDRLIN 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.

DDS GRDLIN (Grid Line) Keyword--Example

Figure 453 shows how to specify the GRDLIN keyword.

Figure 453. Specifying 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:

DDS GRDRCD (Grid Record) Keyword

Use this record-level keyword to define a grid line structure. A grid line is defined as:

This keyword has no parameters.

A grid line record may contains one or more GRDBOX or GRDLIN keywords that define the grid structures; otherwise, it may contain the GRDCLR keyword to remove grid line structures from the display. The grid line record may only contain the GRDCLR keyword to clear the grid structure.

A record with the GRDRCD keyword specified must contain only grid related keywords or keywords needed to define a window. It can not contain any other displayable fields. There may be program-to-system fields on the record that define the allowable parameters on the grid related keywords.

The following keywords are allowed on a record containing the GRDRCD keyword:

DSPMOD
FRCDTA
GRDATR
GRDBOX
GRDCLR
GRDLIN
RETKEY
RETCMDKEY
RMVWDW
USRRSTDSP
WDWBORDER
WDWTITLE
WINDOW

The grid record may contain a window definition.

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

Option indicators are not valid for this keyword.

DDS GRDRCD (Grid Record) Keyword--Example

Figure 454 shows how to specify the GRDRCD keyword.

Figure 454. Specifying the GRDRCD Keyword

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A
A          R GRDREC1                   GRDRCD
A

DDS IGCALTTYP (Alternative Data Type) Keyword

Specify this field-level keyword to change input- and output-capable alphanumeric character fields to DBCS fields with data type O.

This keyword has no parameters.

Put the keyword into effect by specifying IGCDTA(*YES) on the CRTDSPF, CHGDSPF, and OVRDSPF commands. Fields specified with this keyword are DBCS fields when you specify IGCDTA(*YES) and are alphanumeric character fields when you specify IGCDTA(*NO). For example, you could create the file by specifying IGCDTA(*NO) on the CRTDSPF command. When using the file to display DBCS data, override the file with the OVRDSPF command, specifying IGCDTA(*YES). To override the display file IGCDSPF, type:

OVRDSPF FILE(IGCLIB/IGCDSPF) IGCDTA(*YES)

Consider the following, when using the IGCALTTYP keyword:

Option indicators are not allowed with IGCALTTYP.

DDS IGCALTTYP (Alternative Data Type) Keyword--Example

Figure 455 shows how to specify the IGCALTTYP keyword on the DDS coding form.

Figure 455. Specifying the IGCALTTYP Keyword for Display Files

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R RECORD
00020A            FLDA          79A  I 23  2IGCALTTYP
     A

When the IGCALTTYP keyword is put into effect, FLDA can contain DBCS data.

DDS IGCCNV (DBCS Conversion) Keyword

This file-level keyword lets you use DBCS conversion, an alternative to directly typing in DBCS characters from a keyboard, in display files.

The format for the keyword is:

IGCCNV(CFnn line-number)

The first parameter, CFnn, identifies which command function key, when pressed, begins and ends the conversion function. Specify any CF key (CF01 through CF24) as the parameter value. Do not specify a CF key that has already been assigned a function.

The second parameter, line-number, identifies where (on the display) the system should place the conversion prompt line. When you type the alphanumeric word to be converted on the conversion prompt line, the system displays related DBCS words. The prompt line requires an entire display line and looks like this:

_ ______  _ XXXXXXXXXXXXXXXXXXXXXX

The underlined fields (_) are input fields, in which you type the word to be converted and specify the type of conversion to be performed.

The field indicated with XXXX is an output field, in which the system displays DBCS words related to the alphanumeric entry to be converted.

The prompt line can be placed anywhere on the display, as long as it does not overlap other displayed records that contain input fields.

Consider the following when using the IGCCNV keyword:

DDS IGCCNV (DBCS Conversion) Keyword--Example

Figure 456 shows how to specify the IGCCNV keyword on the DDS coding form.

Figure 456. Specifying the IGCCNV Keyword for Display Files

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00100A*
00101A*
00102A                                      IGCCNV(CF24 24)
00103A          R MENU
     A

A user can press the F24 key to begin and end DBCS conversion. Conversion may be used on all input-capable DBCS fields. The conversion format is displayed on line 24.

DDS Additional Considerations for Describing Display Files

Consider the following when describing a display file that contains DBCS data: