Example of Random-by-Key Processing

The following is an example of how to use the random-by-key method of processing data. Figure 1 and Figure 1 show the data description specifications (DDS) for the physical files used by EMSTUPD ( Figure 1).

Figure 1. DDS for database file CHANGE (physical file)
     A*****************************************************************
     A*  RELATED PGMS:  EMSTUPD                                       *
     A*  DESCRIPTIONS:  This is the DDS for the physical file CHANGE. *
     A*                 It contains one record format called CHGREC.  *
     A*                 This file contains new data that is used to   *
     A*                 update the EMPMST file.                       *
     A*****************************************************************
     A*
     A          R CHGREC
     A            ENUM           5  0       TEXT('EMPLOYEE NUMBER')
     A            NNAME         20          TEXT('NEW NAME')
     A            NTYPE          1          TEXT('NEW TYPE')
     A            NDEPT          3  0       TEXT('NEW DEPARTMENT')
     A            NNHRS          3  1       TEXT('NEW NORMAL WEEK HOURS')
     A          K ENUM