DDS for display files


HOME (Home) keyword for display files

Use this file- or record-level keyword to specify that you want to recognize and handle the Home key through your program.

Refer to Appendix B, System/36 environment considerations for display files, for special considerations when specifying the HOME keyword in files that are used in the System/36 environment.

The format of the keyword is:

HOME[(response-indicator ['text'])]

If you press the Home key and the cursor is not already at the home position, the cursor returns to the home position, whether or not you specify the HOME keyword.

If the cursor is already at the home position when the Home key is pressed, the OS/400 program returns control to your program as it does when a command attention key is pressed (no data is received from the device). In this situation, if you have not specified the HOME keyword, the OS/400 program sends a message indicating that the key is not valid at that time.

The home position is one of the following (in order of priority):

The optional text is included on the computer printout created at program compilation time to explain the intended use of the indicator. This text's only function in the file or the program is 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 computer printout.

Option indicators are valid for this keyword.

Example:

The following example shows how to specify the HOME keyword so that if the cursor is in the home position when the Home key is pressed, control returns to the program with response indicator 95 set on.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00030A                                      HOME(95 'Home key')
     A


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]