Booth Martin; Contract 
Programming, Inc.
28 Delmont Avenue
Barre, Vermont 05641
802-476-7942
boothm@ibm.net

Screen shot of small subfile screen

An RPG program to demonstrate subfile selection based upon the row selected with the cursor. (note the scroll bar, too.)




The DDS code:

     A*%%TS  SD  19980421  153743  BOOTH       REL-V3R7M0  5716-PW1
     A*%%EC
     A                                      DSPSIZ(24 80 *DS3)
     A*
     A          R SFLA                      SFL
     A*%%TS  SD  19980421  153743  BOOTH       REL-V3R7M0  5716-PW1
     A            APTERM    R        O  1  1REFFLD(RAPTERMS/APTERM APGL2/APTERM-
     A                                      S)
     A          R FMT01                     SFLCTL(SFLA)
     A                                      SFLSIZ(6)
     A                                      SFLPAG(5)
     A                                      WINDOW(16 25 5 18 *NOMSGLIN)
     A N91                                  SFLEND(*SCRBAR)
     A                                      OVERLAY
     A                                      SFLCSRRRN(&RRNA)
     A                                      SFLDSP
     A                                      SFLDSPCTL
     A                                      MOUBTN(*ULP *ULD ENTER)
     A            RRNA           5S 0H
     A          R DUMMY
     A                                      TEXT('PREVENTS PREVIOUS SCREEN FROM-       
     A                                      BEING CLEARED')
     A                                      ASSUME
     A                                  5  9' '



The RPG code:
      *************************************************************
      * A program to show a pick window for prompting:            *
      *    4/98  Booth M.                                         *
      *                                                           *
      *                                                           *
      *************************************************************
     FSUBFLFM CF  E                    WORKSTN
     F                                        RRNA  KSFILE SFLA
     FAPTERMS IF  E                    DISK
     C*  ..................................................
     C           *ENTRY    PLIST
     C                     PARM           APTERM 15
     C**
     C* Fill the subfile:
     C                     Z-ADD1         RRN     40
     C                     READ RAPTERMS                 58
     C           *IN58     DOWEQ*OFF
     C                     Z-ADDRRN       RRNA
     C                     WRITESFLA
     C                     ADD  1         RRN
     C                     READ RAPTERMS                 58
     C                     END
     C           RRNA      IFGT 5
     C                     MOVE *ON       *IN91
     C                     END 
     C                     EXFMTFMT01
     C**
     C* If a choice was made, save it to PARM for return:
     C           RRNA      IFGT *ZEROS
     C           RRNA      CHAINSFLA                 54
     C                     END
     C                     MOVE *ON       *INLR
     C* ....................................................                          

For comments or questions, leave e-mail
Review a sample of my coding work
Return to my home page
Top of page