HP Integrity NonStop J-Series User Manual

Page 171

Advertising
background image

USING AN ENABLE APPLICATION
READ GENERIC

You must then enter the number of characters to be used for the
compare operation and press F8 a second time. The application
uses the specified number of characters for the compare operation
and returns the appropriate record. For example, suppose that
you want to request a READ GENERIC operation for the following
key field:

+ EMPNAME __________________

Suppose further that the employee file contains records for
employees named MARILYN, MARGARET, and MARIE. If you enter the
following partial characters, you will retrieve the indicated
records:

M MARGARET returned MARIE returned on READ NEXT
MA MARGARET returned MARIE returned on READ NEXT
MAR MARGARET returned MARIE returned on READ NEXT
MARI MARIE returned MARILYN returned on READ NEXT
MARG MARGARET returned Record not found on READ NEXT

Now, suppose that a field appears as follows:

* EMPNUM ____

If the employee file contains records for employee numbers 0
through 123, the application will return the record listed in
Figure 8-6 depending upon the value you enter and the compare
length you specify.

-----------------------------------------------------------------
| |
| Compare length Field Value Record Returned |
| |
| 0 0123 EMPNUM 123 |
| (full field size used) |
| 1 0xxx EMPNUM 0 (0000) |
| 2 01xx EMPNUM 100 (0100) |
| 3 012x EMPNUM 120 (0120) |
| 4 0123 EMPNUM 123 (0123) |
| no length specified 0123 EMPNUM 123 |
| (full field size used) |
| value greater than 4 0123 EMPNUM 123 |
| (full field size used) |
| |
-----------------------------------------------------------------

Figure 8-6. Example of Records Returned

8-18

Advertising
This manual is related to the following products: