BLANKS (Blanks) Keyword for Display Files

This field-level keyword, when specified for a numeric, input-capable field, enables your program to distinguish when the field is blank and when the field is zero on the display. In either case, your program sees zeros. The BLANKS keyword sets on the specified response indicator when the field is blank on the display. After an input operation, your program can test this indicator to determine that the field (whose program value is zero) is actually blank on the display. The field can contain all blanks (hex 40) or all nulls (hex 00). It still appears blank to the display station user. If the indicator is off, the field is zero on the display.

This keyword is also valid for character fields, but there is generally no need to specify it for them. Your program can test character fields directly to determine what is on the display.

Refer to Appendix F, System/36 Environment Considerations Using DDS, for special considerations when specifying the BLANKS keyword in files that are used in the System/36 environment.

The format of the keyword is:

BLANKS(response-indicator ['text'])

The response indicator associated with the BLANKS keyword should be unique within the record. That is, the same response indicator should not be used with other keywords such as CHANGE, DUP, or VLDCMDKEY; with any of the keywords for function keys; or with the BLANKS keyword on other fields in the same record. This is because the OS/400 program always turns the response indicator off if the field contains non-blank characters on an input operation. The OS/400 program does this to make sure that when the field appears as all blanks, the response indicator is set on, and that when it does not appear as all blanks, the response indicator is set off.

The optional text is included on the list generated at program compilation time to explain the intended use of the indicator. This text has no function in the file or the program other than as a comment. The apostrophes are required. If you specify more than 50 characters between the apostrophes, the text is truncated to 50 characters on the program list.

Option indicators are not valid for this keyword.