     A*===============================================================
     A* This is a "load all" subfile in a windown to select a
     A* state code.
     A*===============================================================
     A*  CRTDSPF FILE(PMTSTATED) SRCFILE(...) RSTDSP(*YES)
     A*==============================================================
     A* There is a naming convention for the fields in each record.
     A*  -- Screen Header:   Fields begin with SH_
     A*  -- Subfile:         Fields begin with SF_
     A*  -- Subfile Control: Fields begin with SC_
     A*  -- Screen footer:   Fields begin with SFT_
     A*===============================================================
     A* Indicator usage:
     A*   01-20 Are not routinely cleared after an EXFMT.  Some
     A*         of these are used in subfile & subfile control for
     A*         highlighting, etc., which does not change unless
     A*         explicitly requested.
     A*   21-99 Are routinely cleared after and EXFMT.
     A*         80-89 Subfile record
     A*         90    Nessage Subfile end
     A*         91-99 Subfile Control Record
     A* Note: INDARA is specified here and in the program and this
     A*       means that the display file indicators are in a
     A*       data structure separate from the program indicators.
     A*       This makes it easy to name the indicators in the DS.
     A*==============================================================
     A                                      DSPSIZ(24 80 *DS3                  -
     A                                             27 132 *DS4)
     A                                      PRINT
     A                                      INDARA
     A                                      ALTHELP
     A                                      HELP
     A*===============================================================
     A*=== Screen Header:  Fields begin with SH_ =====================
     A*
     A          R SH_HDR
     A                                      OVERLAY
     A                                      TEXT('Screen Header')
     A                                      WINDOW(*DFT 16 40)
     A                                      WDWBORDER((*DSPATR RI) (*CHAR +
     A                                      '        '))
     A                                      WDWBORDER((*COLOR BLU))
     A            SH_PGM        10A  O  1  1
     A                                  1 16'USA States'
     A                                      COLOR(WHT)
     A                                  1 33DATE
     A                                      EDTCDE(Y)
     A            SH_FUNCT      17A  O  2 13DSPATR(HI)
     A                                  2 33TIME
     A                                  2  1USER
     A*===============================================================
     A*=== Subfile:  Fields begin with SF_ ===========================
     A*
     A          R SFL                       SFL
     A                                      TEXT('SubFile')
     A  80                                  SFLNXTCHG
     A            SF_OPT         1A  B  6  2
     A  81                                  DSPATR(RI)
     A  82                                  DSPATR(PC)
     A            SF_CODE        2A     6  6
     A  22                                  COLOR(RED)
     A            SF_NAME       30A  O  6 11
     A  22                                  COLOR(RED)
     A*===============================================================
     A*=== Subfile Control: Fields begin with SC_ ====================
     A*
     A          R SFLCTL                    SFLCTL(SFL)
     A                                      CF03
     A                                      CF05
     A                                      CF07
     A                                      CF12
     A  *DS3                                SFLSIZ(9999)
     A  *DS4                                SFLSIZ(9999)
     A  *DS3                                SFLPAG(0006)
     A  *DS4                                SFLPAG(0006)
     A  *DS3                                WINDOW(SH_HDR)
     A  *DS4                                WINDOW(SH_HDR)
     A                                      TEXT('Subfile Control')
     A                                      RTNCSRLOC(&SC_PMT_RCD &SC_PMT_FLD)
     A                                      BLINK
     A                                      OVERLAY
     A N98                                  ERASE(SFL)
     A  98                                  SFLDSP
     A                                      SFLDSPCTL
     A  99                                  SFLCLR
     A  97                                  SFLEND(*MORE)
     A                                  3  1'Name Contains'
     A            SC_NAME       10A  B  3 16
     A  95                                  DSPATR(MDT)
     A            SC_OPTIONS    20A     4  1COLOR(BLU)
     A                                  4 26'Sorted by:'
     A            SC_SORTED      4      4 37
     A                                  5  1'Opt'
     A                                      DSPATR(HI)
     A                                      DSPATR(UL)
     A                                  5  5'Code'
     A  01                                  COLOR(PNK)
     A                                      DSPATR(UL)
     A                                  5 11'Name                          '
     A                                      DSPATR(UL)
     A  02                                  COLOR(PNK)
     A            SC_PMT_RCD    10A  H
     A            SC_PMT_FLD    10A  H
     A            SC_CSR_RCD     4S 0H      SFLRCDNBR(CURSOR)
     A*===============================================================
     A*=== Screen footer & function keys:  Fields begin with SFT_ ====
     A*
     A          R SFT_FKEY
     A  *DS3                                WINDOW(SH_HDR)
     A  *DS4                                WINDOW(SH_HDR)
     A                                      TEXT('Screen Footer')
     A                                      OVERLAY
     A                                 13  1'          Demo Corp of America    -
     A                                            '
     A                                      DSPATR(UL)
     A            SFT_KEYS      40   O 14  1
     A*===============================================================
     A*=== Message Subfile:  No fields ===============================
     A*
     A          R MSGSFL                    SFL
     A                                      TEXT('Message Subfile')
     A                                      SFLMSGRCD(15)
     A            MSGKEY                    SFLMSGKEY
     A            MSGPGMQF                  SFLPGMQ(10)
     A*===============================================================
     A*=== Message Subfile Control: No fields ========================
     A*
     A          R MSGCTL                    SFLCTL(MSGSFL)
     A                                      TEXT('Message Subfile Control')
     A                                      WINDOW(SH_HDR)
     A                                      PAGEDOWN
     A                                      PAGEUP
     A                                      OVERLAY
     A                                      SFLDSP
     A                                      SFLDSPCTL
     A                                      SFLINZ
     A N90                                  SFLEND
     A                                      SFLSIZ(0002)
     A                                      SFLPAG(0001)
     A            MSGPGMQC                  SFLPGMQ(10)
     A*===============================================================
     A*=== Dummy Record - Assume =====================================
     A*
     A          R DUMMY
     A                                      ASSUME
     A                                  1  2' '
     A*%%RS+<record-sequences>
     A*%%RS+ <sequence name="SCREEN1">
     A*%%RS+  <device type="display" width="80" height="24" />
     A*%%RS+  <record-write record-format="SH_HDR" />
     A*%%RS+  <record-write record-format="SFL" />
     A*%%RS+  <record-write record-format="SFLCTL" />
     A*%%RS+  <record-write record-format="SFT_FKEY" />
     A*%%RS+ </sequence>
     A*%%RS </record-sequences>
     A*%%RS+<record-sequences>
     A*%%RS+ <sequence name="Untitled">
     A*%%RS+  <device type="display" width="132" height="27" />
     A*%%RS+ </sequence>
     A*%%RS </record-sequences>
     A*%%RS+<record-sequences>
     A*%%RS+ <sequence name="Untitled">
     A*%%RS+  <device type="display" width="80" height="24" />
     A*%%RS+ </sequence>
     A*%%RS </record-sequences>
     A*%%RS+<record-sequences>
     A*%%RS+ <sequence name="Untitled">
     A*%%RS+  <device type="display" width="80" height="24" />
     A*%%RS+ </sequence>
     A*%%RS </record-sequences>
