SZIPMENU: DDS for a Display Device File

Figure 210. DDS for display device file SZIPMENU
     A*****************************************************************
     A*     FILE NAME:  SZIPMENU                                      *
     A*  RELATED PGMS:  SCHZIP                                        *
     A* RELATED FILES:  CUSMSTL2   (LOGICAL FILE)                     *
     A*   DESCRIPTION:  THIS IS THE DISPLAY FILE SZIPMENU. IT HAS 6   *
     A*                 RECORD FORMATS.                               *
     A*****************************************************************
     A                                      REF(CUSMSTL2)
     A                                      CHGINPDFT(CS)
     A                                      PRINT(QSYSPRT)
     A                                      INDARA
     A                                      CA03(03 'END OF JOB')
     A          R HEAD
     A                                      OVERLAY
     A                                  2  4TIME
     A                                      DSPATR(HI)
     A                                  2 28'CUSTOMER SEARCH BY ZIP'
     A                                      DSPATR(HI RI)
     A                                  2 70DATE
     A                                      EDTCDE(Y)
     A                                      DSPATR(HI)
     A          R FOOT1
     A                                 23  6'ENTER - Continue'
     A                                      DSPATR(HI)
     A                                 23 29'F3 - End Job'
     A                                      DSPATR(HI)
     A          R FOOT2
     A                                 23  6'ENTER - Continue'
     A                                      DSPATR(HI)
     A                                 23 29'F3 - End Job'
     A                                      DSPATR(HI)
     A                                 23 47'F4 - RESTART ZIP CODE'
     A                                      DSPATR(HI)
     A          R PROMPT
     A                                      OVERLAY
     A                                  4  4'Enter Zip Code'
     A                                      DSPATR(HI)
     A            ZIP       R     Y  I  4 19DSPATR(CS)
     A                                      CHECK(RZ)
     A  61                                  ERRMSG('ZIP CODE NOT FOUND' +
     A                                      61)
     A          R SUBFILE                   SFL
     A            NAME      R           9  4
     A            ARBAL     R           9 27EDTCDE(J)
     A          R SUBCTL                    SFLCTL(SUBFILE)
     A  55                                  SFLCLR
     A  55                                  SFLCLR
     A N55                                  SFLDSPCTL
     A N55                                  SFLDSP
     A                                      SFLSIZ(13)
     A                                      SFLPAG(13)
     A                                      ROLLUP(95 'ROLL UP')
     A                                      OVERLAY
     A                                      CA04(04 'RESTART ZIP CDE')
     A                                  4  4'Zip Code'
     A            ZIP       R        O  4 14DSPATR(HI)
     A                                  7  4'Customer Name'
     A                                      DSPATR(HI UL)
     A                                  7 27'A/R Balance'
     A                                      DSPATR(HI UL)

The DDS for the SZIPMENU display device file contains six record formats: HEAD, FOOT1, FOOT2, PROMPT, SUBFILE, and SUBCTL.

The PROMPT record format requests the user to enter a zip code. If the zip code is not found in the file, an error message is displayed. The user can press F3, which sets on indicator 03, to end the program.

The SUBFILE record format must be defined immediately preceding the subfile-control record format SUBCTL. The subfile record format, which is defined with the keyword SFL, describes each field in the record, and specifies the location where the first record is to appear on the display (here, on line 9).

The subfile-control record format contains the following unique keywords:

The OVERLAY keyword defines this subfile-control record format as an overlay format. This record format can be written without the IBM i system erasing the screen first. F4 is valid for repeating the search with the same zip code. (This use of F4 allows a form of roll down.)



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