Keyboard Control for Display Files

When the CHECK keyword is used with a keyboard control code, it controls certain data-entry aspects. The valid keyboard control codes are:

Keyboard Control Code
Meaning

ER
End of record; equivalent to AUTO(RA)

FE
Field exit check

LC
Lowercase; equivalent to LOWER

RB
Right-justified with blank fill; equivalent to AUTO(RAB)

RZ
Right-justified with zero fill; equivalent to AUTO(RAZ)

ER (End of Record) for Display Files

Use this code so that the work station user does not need to press the Enter key. Whenever the work station user keys a character (including a blank) into the last position of the field, the record is sent from the device just the same as if the Enter key had been pressed. If you also specify DSPATR(SP) for the field, the record is sent from the device as soon as the work station user selects the field. If you use this function, it should be on the last field typed in by the user for this record.

Option indicators are valid for this keyword.

FE (Field Exit Check) for Display Files

This code specifies that the work station user cannot advance to the next input field without pressing one of the field exit keys. The cursor remains under the low-order character position of the field until a valid field exit key has been pressed, even though that character has been keyed in. If the user presses any other key, an error results.

If you want to specify CHECK(FE) for all the input-capable fields in a record format, specify CHGINPDFT(FE) at the record level. If you want to specify CHECK(FE) for all the input-capable fields in a file, specify CHGINPDFT(FE) at the file level.

Field exit keys include the Field Exit, Field+, Field-, and cursor movement keys. Which keys are valid field exit keys depends on the keyboard style being used.

This code applies only to input fields into which the work station user can type.

Option indicators are not valid for this keyword.

LC (Lowercase) for Display Files

Use CHECK(LC) for input-only or output/input fields to permit the work station user to type lowercase a through z. The way the work station user keys in the characters (uppercase or lowercase) is the way the characters appear on the display and are returned to your program.

If you want to specify CHECK(LC) for all the character input-capable fields in a record format, specify CHGINPDFT(LC) at the record level. If you want to specify CHECK(LC) for all the character input-capable fields in a file, specify CHGINPDFT(LC) at the file level.

Your program can display a field that contains both uppercase and lowercase characters.

If you specify this keyword, lowercase a through z remain lowercase. If you do not specify this keyword, lowercase a through z are changed to uppercase.

The CHECK(LC) keyword has no effect on data-entry keyboards. Data-entry keyboards do not support lowercase characters a through z.

Option indicators are not valid for this keyword.

Figure 115 shows how to specify the CHECK(LC) keyword.

Figure 115. Specifying the CHECK(LC) Keyword

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00100A            NAME          30   I  3  2CHECK(LC)
     A

RB (Right Justify with Blank Fill) for Display Files

This code shifts data typed into the field to the farthest right positions and fills the remaining positions with blanks.

For signed numeric fields, you do not need to specify CHECK(RB). Right-justified with blank fill is the default. When the value of a signed numeric field is zero, it appears as all blanks on the display.

The OS/400 program converts blanks to zeros when returning numeric fields to your program.

Option indicators are not valid for this keyword.

RZ (Right Justify with Zero Fill) for Display Files

This code shifts data typed into the field to the farthest right positions and fills the remaining positions with zeros.

For signed numeric fields, if you do not specify CHECK(RZ), CHECK(RB) is the default.

Option indicators are not valid with this keyword.

Programming considerations for CHECK(RB) and CHECK(RZ) include the following:

Figure 116 shows how to specify the CHECK keyword for right-justified with blank fill (RB) and for right-justified with zero fill (RZ).

Figure 116. Specifying the CHECK Keyword for Right-justified with Zero Fill and Blank Fill

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R RECORD1
00020A* Numeric only
00030A            DATA1          7Y OI  2  2TEXT('No right-adjust')
00040A            DATA2          7Y OI  3  2CHECK(RZ)
00050A* Signed numeric
00060A            DATA3          7S OI  4  2TEXT('CHECK(RB) is the default')
00070A            DATA4          7S OI  5  2CHECK(RZ)
00080A* Character
00090A            DATA5          7   I  6  2TEXT('No right-adjust')
00100A            DATA6          7   I  7  2CHECK(RB)
     A