         SYSTEM   SIG7FDP                                               C:NCRS
*                                                                       C:NCRS
*        CONTROLLER TO BRANCH AROUND CO-RESIDENT SORT CODE              C:NCRS
*                                                                       C:NCRS
         DEF      C:SRT,C:WSR,C:RSR                                     C:NCRS
         REF      C:WLR,C:RLR                                           C:NCRS
         REF      C:WLD,C:RLD                                           C:NCRS
*        REGISTERS                                                      C:NCRS
R2       EQU      2                                                     C:NCRS
R3       EQU      3                                                     C:NCRS
R4       EQU      4                                                     C:NCRS
R5       EQU      5                                                     C:NCRS
R6       EQU      6                                                     C:NCRS
R7       EQU      7                                                     C:NCRS
R8       EQU      8                                                     C:NCRS
L1       EQU      11                                                    C:NCRS
*                                                                       C:NCRS
SRTYP    DATA     0                 SORT TYPE                           C:NCRS
RET      DATA     0                                                     C:NCRS
ATEND    DATA     0                                                     C:NCRS
ABN      DATA     0                                                     C:NCRS
ERR      DATA     0                                                     C:NCRS
         PAGE
C:SRT    RES      0                                                     C:NCRS
         STW,R5   SRTYP             SAVE SORT TYPE                      C:NCRS
         AI,L1    1                                                     C:NCRS
         CI,R5    1                                                     C:NCRS
         BAZ      *L1               BRANCH AROUND INPUT PROCEDURE CODE  C:NCRS
         AI,L1    15                FOR USING/OUTPUT PROCEDURE EL29574  NCRS
         B        *L1               BRANCH AROUND USING CODE            C:NCRS
*                                                                       C:NCRS
C:WSR    RES      0                                                     C:NCRS
         STW,L1   RET               SAVE RETURN                         C:NCRS
         CI,R6    0                 MORE RECORDS                        C:NCRS
         BE       EOW               NO                                  C:NCRS
         LI,R4    1                                                     C:NCRS
         LI,R5    X'40000'          LOAD I: + 1                         C:NCRS
         CW,R5    R6,R4             CHECK FOR DECLARATIVES              C:NCRS
         BANZ     WLD               YES                                 C:NCRS
         BAL,L1   C:WLR             YES.  WRITE RECORD                  C:NCRS
         B        *RET              RETURN TO USER                      C:NCRS
EOW      RES      0                                                     C:NCRS
         LI,L1    1                                                     C:NCRS
         AW,L1    RET                                                   C:NCRS
         B        *L1               ABNORMAL RETURN                     C:NCRS
*                                                                       C:NCRS
C:RSR    RES      0                                                     C:NCRS
         STW,L1   RET               SAVE RETURN                         C:NCRS
         AI,L1    1                 AT END RETURN                       C:NCRS
         STW,L1   ATEND                                                 C:NCRS
         AI,L1    1                 ABNORMAL RETURN                     C:NCRS
         STW,L1   ABN                                                   C:NCRS
         AI,L1    1                                                     C:NCRS
         STW,L1   ERR                                                   C:NCRS
         LI,R4    1                                                     C:NCRS
         LI,R5    X'40000'          LOAD I: + 1                         C:NCRS
         CW,R5    R6,R4             CHECK FOR DECLARATIVES              C:NCRS
         BANZ     RLD               YES                                 C:NCRS
         BAL,L1   C:RLR             READ RECORD                         C:NCRS
         B        *RET              NORMAL RETURN                       C:NCRS
         B        *ATEND            AT END                              C:NCRS
         B        *ABN              ABNORMAL                            C:NCRS
         B        ERR               ERROR                               C:NCRS
         B        *RET                                                  C:NCRS
RLD      RES      0                                                     C:NCRS
         BAL,L1   C:RLD             READ DECLARATIVES                   C:NCRS
         B        *RET              NORMAL RETURN                       C:NCRS
         B        *ATEND            AT END RETURN                       C:NCRS
         B        *ABN              ABNORMAL RETURN                     C:NCRS
         B        *ERR              ERROR RETURN                        C:NCRS
         B        *RET                                                  C:NCRS
WLD      RES      0                                                     C:NCRS
         BAL,L1   C:WLD             WRITE DECLARATIVES                  C:NCRS
         B        *RET                                                  C:NCRS
         B        EOW                                                   C:NCRS
         END                                                            C:NCRS
