Demo entry 6687528

COBOL

   

Submitted by anonymous on Dec 29, 2017 at 02:02
Language: COBOL. Code size: 524.6 kB.

000100 IDENTIFICATION DIVISION.                                         00010099
000200 PROGRAM-ID.  B27935.                                             00020099
000300******************************************************************00030099
000400*                                                                *00040099
000500*                   PROGRAM DESCRIPTION BLOCK                    *00050099
000600*                                                                *00060099
000700*     PROGRAM NAME: B27935                                       *00070099
000800*         LANGUAGE: COBOLII                                      *00080099
000900*           AUTHOR: CHALOTHORN DECHKIJ (DC3D)                    *00090099
001000*     DATE WRITTEN: 10/17/2014                                   *00100099
001100* APPLICATION AREA: REGULATORY                                   *00110099
001200*      SUBPROJECT#: 0080454                                      *00120099
001300*                                                                *00130099
001400* PROGRAM FUNCTION: W90/W92 TABLES MAINTENANCE PROGRAM. ALSO     *00140099
001500*                   DETERMINE THE 1042-S REPORT STATUS CODE.     *00150099
001600*                   THE WRKE341C INPUT FILE WILL ALWAYS PROVIDE  *00160099
001700*                   CURRENT W90/W92 INFORMATION TO DETERMINE     *00170099
001800*                   RECORDS THAT NEED TO BE INSERT/UPDATE/DELETE *00180099
001900*                   ON THESE TABLE BY EVALUATING THE CORRECT     *00190099
002000*                   REPORT STATUS CODE.                          *00200099
002100*----------------------------------------------------------------*00210099
002200* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  *00220099
002300* (WS00490C)                                                     *00230099
002400* NOTE:  THIS PROGRAM USES QUICKSTART TO HANDLE CHECKPOINT AND   *00240099
002500*        RESTARTING PROCESSING.  PLEASE REVIEW THE QUICKSTART    *00250099
002600*        COMMENT BEFORE YOU MODIFY THIS PROGRAM.                 *00260099
002700*                                                                *00270099
002800* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  *00280099
002900*                                                                *00290099
003000* IF YOU ARE CHANGING THIS PROGRAM BETWEEN ITS ORIGINAL EXECU-   *00300099
003100* TION AND ITS FIRST RESTART, OR BETWEEN ANY TWO RESTART EXECU-  *00310099
003200* TIONS, SOME RESTRICTIONS APPLY TO CHANGING WORKING STORAGE:    *00320099
003300*                                                                *00330099
003400* 1. WORKING STORAGE THAT IS INCLUDED IN THE APPLICATION         *00340099
003500*    PROGRAM'S SAVE AREA CANNOT BE MODIFIED IN ANY WAY THAT      *00350099
003600*    MIGHT CHANGE THE PHYSICAL STRUCTURE OR ATTRIBUTES OF THE    *00360099
003700*    SAVE AREA.                                                  *00370099
003800*                                                                *00380099
003900*    FOR EXAMPLE:  NEW FIELDS CANNOT BE INSERTED INTO THE "BODY" *00390099
004000*    OF THE WORKING STORAGE SAVE AREA.  NEW FIELDS MUST BE       *00400099
004100*    ADDED TO THE "END" OF THE SAVE AREA JUST BEFORE THE         *00410099
004200*    CKPT-AREA-END FIELD.                                        *00420099
004300*                                                                *00430099
004400*    NOTE:  IF CHANGING A SAVE AREA FIELD IS REQUIRED.  IT IS    *00440099
004500*           BEST TO LEAVE THE ORIGINAL FIELD IN ITS PLACE BUT    *00450099
004600*           CHANGE ITS NAME (FOR EXAMPLE, TO FILLER), AND        *00460099
004700*           CREATE THE TARGET FIELD NAME WITH THE DESIRED        *00470099
004800*           CHANGES AT THE "END" OF THE SAVE AREA.  THEN         *00480099
004900*           RESTART THE PROGRAM.  THEN AT A LATER DATE CHANGE    *00490099
005000*           THE SAVE AREA FIELD TO THE NEW DEFINITION, AND       *00500099
005100*           REMOVE THE FIELD YOU ADDED.                          *00510099
005200*                                                                *00520099
005300* REMEMBER, THESE RULES ONLY APPLY WHEN YOU ARE CHANGING THIS    *00530099
005400* PROGRAM BETWEEN ITS ORIGINAL EXECUTION AND RESTARTS.           *00540099
005500*                                                                *00550099
005600* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  *00560099
005700*                                                                *00570099
005800* INPUT FILE:                                                    *00580099
005900*                                                                *00590099
006000*          DD NAME: WE341Y1                                      *00600099
006100*      DESCRIPTION: 1042-S INFORMATION TO INSERT/DELETE/UPDATE   *00610099
006200*                   THE W90 AND W92 TABLE                        *00620099
006300*         COPYBOOK: WRKE341C                                     *00630099
006400*      FILE ACCESS: SEQUENTIAL                                   *00640099
006500*                                                                *00650099
006600*          DD NAME: WE342Y1                                      *00660099
006700*      DESCRIPTION: 1042-S TYPE OF PROCESSING FILE               *00670099
006800*         COPYBOOK: WRKE342C                                     *00680099
006900*      FILE ACCESS: SEQUENTIAL                                   *00690099
007000*                                                                *00700099
007100* INPUT/OUTPUT FILES                                             *00710099
007200*                                                                *00720099
007300*      DATABASE ID: D86                                          *00730099
007400*      DESCRIPTION: AUDIT TABLE                                  *00740099
007500*         COPYBOOK: D86A999C/S                                   *00750099
007600*      FILE ACCESS: DB2/SQL                                      *00760099
007700*                                                                *00770099
007800*      DATABASE ID: QS1                                          *00780099
007900*      DESCRIPTION: QUICKSTART RESTART TABLE                     *00790099
008000*         COPYBOOK: QS1A999C/S                                   *00800099
008100*      FILE ACCESS: DB2/SQL                                      *00810099
008200*                                                                *00820099
008300*      DATABASE ID: W90                                          *00830099
008400*      DESCRIPTION: MUTUAL FUND ACCOUNT 1042S REPORTABLE         *00840099
008500*                   ITEM TABLE                                   *00850099
008600*         COPYBOOK: W90A999C/S                                   *00860099
008700*      FILE ACCESS: DB2/SQL                                      *00870099
008800*                                                                *00880099
008900*      DATABASE ID: W92                                          *00890099
009000*      DESCRIPTION: MUTUAL FUND ACCOUNT 1042S REPORTABLE ITEM    *00900099
009100*                   REPORTING HISTORY TABLE                      *00910099
009200*         COPYBOOK: W92A999C/S                                   *00920099
009300*      FILE ACCESS: DB2/SQL                                      *00930099
009400*                                                                *00940099
009500*----------------------------------------------------------------*00950099
009600* CALLED PROGRAMS                                                *00960099
009700*                                                                *00970099
009800*           SUBRTN: SR0002                                       *00980099
009900*           DDNAME: N/A                                          *00990099
010000*      DESCRIPTION: COMMON ABEND ROUTINE                         *01000099
010100*                                                                *01010099
010200*           SUBRTN: SR0009                                       *01020099
010300*           DDNAME: N/A                                          *01030099
010400*      DESCRIPTION: ABEND ROUTINE FOR TABLE OVERFLOW             *01040099
010500*                                                                *01050099
010600*           SUBRTN: SR0011                                       *01060099
010700*           DDNAME: N/A                                          *01070099
010800*      DESCRIPTION: GET JES JOB NAME                             *01080099
010900*                                                                *01090099
011000*           SUBRTN: SR0622                                       *01100099
011100*           DDNAME: N/A                                          *01110099
011200*      DESCRIPTION: OBTAIN CURRENT DATE, TIME IN DB2 FORMAT      *01120099
011300*                                                                *01130099
011400*           SUBRTN: SR1184                                       *01140099
011500*           DDNAME: N/A                                          *01150099
011600*      DESCRIPTION: WRITE D86 AUDIT RECORDS                      *01160099
011700*                                                                *01170099
011800******************************************************************01180099
011900*                      PROGRAM MAINTENANCE                       *01190099
012000*                (MOST RECENT ENTRY LISTED FIRST)                *01200099
012100******************************************************************01210099
012200*  REVISED BY: CHALOTHORN DECHKIJ (DC3D)     DATE: 12/22/2017    *01220000
012300* SUBPROJECT#: 0086264                      JIRA#: REGDEV-8372   *01230000
012400*         PD#: 2016349004                                        *01240000
012500*----------------------------------------------------------------*01250000
012600*  REVISIONS:  MODIFIED PROGRAM TO CORRECT UNIQUE-ID, AMENDMENT  *01260000
012700*              AND STATUS UPDATES WHEN INPUTS HAVE DIFFERENT     *01270000
012800*              W90 KEYS.                                         *01280000
012900******************************************************************01290000
012600*  REVISED BY: SUPAT CHOOSUK (DSOC)          DATE: 12/05/2017    *01260001
012700* SUBPROJECT#: 0086264                      JIRA#: REGDEV-8216   *01270001
012800*         PD#: 2016349004                                        *01280001
012900*----------------------------------------------------------------*01290000
013000*  REVISIONS:  MODIFIED PROGRAM TO FIX INVALID AMENDMENT NUMBER  *01300001
013100*              (REGDEV-8216)                                     *01310001
013200*              - IN PARA 6500-, ADDED LOGIC TO CALL PARA 6750-   *01320001
013440*                                                                *01344001
013500******************************************************************01350000
012600*  REVISED BY: SUPAT CHOOSUK (DSOC)          DATE: 12/01/2017    *01260002
012700* SUBPROJECT#: 0086264                      JIRA#: REGDEV-8216   *01270001
012800*         PD#: 2016349004                                        *01280001
012900*----------------------------------------------------------------*01290000
013000*  REVISIONS:  MODIFIED PROGRAM TO FIX INVALID AMENDMENT NUMBER  *01300002
013100*              (REGDEV-8216)                                     *01310002
013200*              - IN WORKING STORAGE, ADDED THE FOLLOWING         *01320002
013300*                + WS-SAVE2-WE341Y1-W90-KEY2                     *01330002
013301*                + WS-SAVE-W90-STATUS-2                          *01330102
013302*                + WS-SAVE-W90-STATUS-3                          *01330202
013303*                + WS-INPUT-LESS-THAN-W90-CD                     *01330302
013304*                + WS-PARTIAL-ALLOCATE-CD                        *01330402
013305*                + WS-SELECT-W92-CD                              *01330502
013310*              - IN PARA 3000-                                   *01331002
013311*                + ADDED NEW PARA 3600- WHEN                     *01331102
013320*                  WS-SSN-CHANGE-TWO-STEP-RPT AND                *01332002
013330*                  WS-INPUT-MATCH-OLD-SSN-NO                     *01333002
013331*              - IN PARA 3200-, 6500-                            *01333102
013332*                + ADDED LOGIC TO FIX THE ISSUE.                 *01333202
013340*                                                                *01334002
013500******************************************************************01350000
012600*  REVISED BY: SUPAT CHOOSUK (DSOC)          DATE: 11/27/2017    *01260000
012700* SUBPROJECT#: 0086264                      JIRA#: REGDEV-8216   *01270000
012800*         PD#: 2016349004                                        *01280000
012900*----------------------------------------------------------------*01290000
012910*  REVISIONS:  REPLACED THE NAME OF PARA                         *01291000
012920*                + FROM PARA 4250- TO 6750-                      *01292000
012930*                + FROM PARA 4700- TO 6850-                      *01293000
013000*              MODIFIED PROGRAM TO FIX INVALID AMENDMENT NUMBER  *01300000
013010*              (REGDEV-8216)                                     *01301000
013100*              - IN PARA 6000-,REMOVED WS-CUR-AMENDMENT-NBR      *01310000
013200*              MODIFIED PROGRAM TO FIX INVALID UNIQUE FORM ID    *01320000
013411*              - IN PARA 6850-,UPDATED LOGIC TO VALIDATE THE     *01341100
013412*                TAX-RSP-TAX-ID                                  *01341200
013414*              MODIFIED PROGRAM TO FIX INVALID UNIQUE FORM ID    *01341400
013415*              WHEN STATUS IS 0 AND SSN CHANGE                   *01341500
013416*              - IN PARA 6500-,ADDED LOGIC TO CALL PARA 6750-    *01341600
013417*                WHEN WS-SSN-CHANGE-YES                          *01341700
013450*                                                                *01345000
013500******************************************************************01350000
012200*  REVISED BY: SUPAT CHOOSUK (DSOC)          DATE: 11/20/2017    *01220007
012300* SUBPROJECT#: 0086264                      JIRA#: ABEND-143122  *01230007
012400*         PD#: 2016349004                                        *01240007
012500*----------------------------------------------------------------*01250007
012600*  REVISIONS:  MODIFIED PROGRAM TO FIX ABEND-143122              *01260007
012700*              - REMOVED COALESCE FROM W90_W92_CURSOR AND        *01270007
012800*                W90_W92_ACCM_CURSOR.                            *01280007
012900*              - ADD NULL INDICATOR INTO FETCH OF W90_W92_CURSOR *01290007
013000*                AND W90_W92_ACCM_CURSOR.                        *01300007
013100*              - REPLACED MOVE LOGIC FROM PARA 4050- AND 4250-   *01310007
013200*                INTO NEW PARA 4700-MOVE-INPUT-TO-W90.           *01320007
013300*                                                                *01330007
013400******************************************************************01340007
012200*  REVISED BY: SUPAT CHOOSUK (DSOC)          DATE: 09/26/2017    *01220099
012300* SUBPROJECT#: 0086264                      JIRA#: REGDEV-6955   *01230099
012400*         PD#: 2016349004                                        *01240099
012500*----------------------------------------------------------------*01250099
012600*  REVISIONS:  MODIFIED PROGRAM TO SUPPORT NEW FIELDS            *01260099
012700*              W90 TABLE                                         *01270099
012800*              - UNIQUE-FORM-ID                                  *01280099
012900*              W92 TABLE                                         *01290099
013000*              - AMENDMENT-NBR                                   *01300099
013100*                                                                *01310099
013200*  NOTE: SEE DETAIL IN REGDEV-6955                               *01320099
013300*                                                                *01330099
013400******************************************************************01340099
013500*  REVISED BY: CHALOTHORN DECHKIJ (DC3D)     DATE: 10/05/2016    *01350099
013600* SUBPROJECT#: 0084637                      JIRA#: REGDEV-4348   *01360099
013700*         PD#: 2016144001                                        *01370099
013800*----------------------------------------------------------------*01380099
013900*  REVISIONS:  MODIFIED PROGRAM TO PROCESS ON STEP CORRECTION.   *01390099
014000*              - REPORT STATUS WILL BE UPDATED/INSETRED TO '3'   *01400099
014100*                INSTEAD OF '5-NULL' WHEN 1042S KEY(W90) IS NOT  *01410099
014200*                FOUND ON THE WE341Y1 BECAUSE AMOUNTS ARE ZEROS. *01420099
014300*              - REPORT STATUS 2 WILL BE INSERTED WHEN WE341Y1   *01430099
014400*                CONTAINS NEW 1042S KEY THAT DOES NOT EXIST      *01440099
014500*                ON W90.                                         *01450099
014600*              MODIFIED PARA : 4140-, 4500-, 5000-               *01460099
014700*                                                                *01470099
014800******************************************************************01480099
014900*  REVISED BY: CHALOTHORN DECHKIJ (DC3D)     DATE: 08/02/2016    *01490099
015000* SUBPROJECT#: 0083809                      JIRA#: REGDEV-3469   *01500099
015100*         PD#: 2016144001                                        *01510099
015200*----------------------------------------------------------------*01520099
015300*  REVISIONS:  SINCE THE NEW FIELD LMT-ON-BEN-CD WAS ADDED TO    *01530099
015400*              W90 TABLE, THE PROGRAM HAVE TO MODIFY TO          *01540099
015500*              INSERT/UPDATE THIS FIELD ON THE W90 TABLE.        *01550099
015600*              - MODIFIED PROGRAM TO PROVIDE LMT-ON-BEN-CD AS    *01560099
015700*              A KEY OF W90 AND WE341Y1.                         *01570099
015800*              - MODIFIED W90_W92_CURSOR AND W90_W92_ACCM_CURSOR *01580099
015900*              TO CONTAIN THE LMT_ON_BEN_CD FIELD.               *01590099
016000*              MODIFY PARA : 6500-, 7050-, 7800-, 8120-, 8300-,  *01600099
016100*                            8900-, 9200-                        *01610099
016200*                                                                *01620099
016300******************************************************************01630099
016400*  REVISED BY: CHALOTHORN DECHKIJ(DC3D)      DATE: 10/22/2015    *01640099
016500* SUBPROJECT#: 0081796                      JIRA#: ABEND-78430   *01650099
016600*         PD#: 2015015002                                        *01660099
016700*                                                                *01670099
016800*----------------------------------------------------------------*01680099
016900*                                                                *01690099
017000*  REVISIONS:  - ADDED CHECKING END OF CURSOR BEFORE FETCH NEXT  *01700099
017100*              RECORD IN PARAGRAPH 4160- TO FIX LONG RUN ISSUE.  *01710099
017200*              - ADDED ACCUMULATION-TYPE-CD IN WHERE CONDITION   *01720099
017300*              IN PARAGRAPH 7740- AND 7760- TO SELECT CURRENT    *01730099
017400*              SSN CORRECTLY.                                    *01740099
017500******************************************************************01750099
017600*  REVISED BY: CHALOTHORN DECHKIJ(DC3D)      DATE: 10/13/2015    *01760099
017700* SUBPROJECT#: 0081796                      JIRA#: ABEND-77701   *01770099
017800*         PD#: 2015015002                                        *01780099
017900*                                                                *01790099
018000*----------------------------------------------------------------*01800099
018100*                                                                *01810099
018200*  REVISIONS:  CHANGED ORDER OF SAVING KEY FIELDS TO FIX ISSUE   *01820099
018300*              WHEN THERE WERE TWO TAX YEAR COME FROM NIGHTLY    *01830099
018400*              REBUILD.                                          *01840099
018500*                                                                *01850099
018600******************************************************************01860099
018700*                                                                *01870099
018800*  REVISED BY: CHALOTHORN DECHKIJ(DC3D)      DATE: 10/07/2015    *01880099
018900* SUBPROJECT#: 0081796                      JIRA#: REGDEV-850    *01890099
019000*         PD#: 2015015002                                        *01900099
019100*                                                                *01910099
019200*----------------------------------------------------------------*01920099
019300*                                                                *01930099
019400*  REVISIONS:  MODIFIED PROGRAM TO HANDLE SSN CHANGE PROCESS.    *01940099
019500*                                                                *01950099
019600******************************************************************01960099
019700                                                                  01970099
019800 ENVIRONMENT DIVISION.                                            01980099
019900 INPUT-OUTPUT SECTION.                                            01990099
020000 FILE-CONTROL.                                                    02000099
020100                                                                  02010099
020200     SELECT  100-1042S-RPT-INFO-FILE                              02020099
020300         ASSIGN TO WE341Y1                                        02030099
020400         FILE STATUS IS 100-1042S-RPT-INFO-FILE-STATUS.           02040099
020500                                                                  02050099
020600     SELECT  110-ACCT-DRIVER-FILE                                 02060099
020700         ASSIGN TO WE342Y1                                        02070099
020800         FILE STATUS IS 110-ACCT-DRIVER-FILE-STATUS.              02080099
020900                                                                  02090099
021000 DATA DIVISION.                                                   02100099
021100 FILE SECTION.                                                    02110099
021200                                                                  02120099
021300 FD  100-1042S-RPT-INFO-FILE                                      02130099
021400     RECORDING MODE F                                             02140099
021500     BLOCK CONTAINS 0 RECORDS.                                    02150099
021600                                                                  02160099
021700     COPY  WRKE341C                                               02170099
021800                REPLACING  == WRKE341==                           02180099
021900                       BY  == 100-1042S-RPT-INFO-REC==.           02190099
022000                                                                  02200099
022100 FD  110-ACCT-DRIVER-FILE                                         02210099
022200     RECORDING MODE F                                             02220099
022300     BLOCK CONTAINS 0 RECORDS.                                    02230099
022400                                                                  02240099
022500     COPY  WRKE342C                                               02250099
022600                REPLACING  == WRKE342==                           02260099
022700                       BY  == 110-ACCT-DRIVER-REC==.              02270099
022800                                                                  02280099
022900 WORKING-STORAGE SECTION.                                         02290099
023000 01  FILLER                          PIC X(32)  VALUE             02300099
023100     'WS FOR PGM B27935 BEGINS HERE   '.                          02310099
023200                                                                  02320099
023300     EXEC SQL INCLUDE WS00489C END-EXEC.                          02330099
023400                                                                  02340099
023500* (WS00491C)                                                      02350099
023600* BEGINNING HERE, PLACE ANY COBOL DATA AREAS THAT ARE TO BE       02360099
023700* INCLUDED IN THE WORKING STORAGE SAVE AREA WHICH QUICKSTART      02370099
023800* WILL SAVE DURING A CHECKPOINT AND UPDATE DURING A RESTART.      02380099
023900* THE WORKING STORAGE SAVE AREA BEGINS WITH CKPT-SAVE-AREA AND    02390099
024000* ENDS WITH CKPT-AREA-END.                                        02400099
024100*                                                                 02410099
024200 01  WS-ACCUMULATORS.                                             02420099
024300     05  WS-WE341Y1-CNT              PIC S9(09) COMP-3            02430099
024400                                                VALUE ZERO.       02440099
024500     05  WS-WE342Y1-CNT              PIC S9(09) COMP-3            02450099
024600                                                VALUE ZERO.       02460099
024700     05  WS-W90-ADD-CNT              PIC S9(09) COMP-3            02470099
024800                                                VALUE ZERO.       02480099
024900     05  WS-W92-ADD-CNT              PIC S9(09) COMP-3            02490099
025000                                                VALUE ZERO.       02500099
025100     05  WS-W92-UPD-CNT              PIC S9(09) COMP-3            02510099
025200                                                VALUE ZERO.       02520099
025300     05  WS-W90-DEL-CNT              PIC S9(09) COMP-3            02530099
025400                                                VALUE ZERO.       02540099
025500     05  WS-W92-DEL-CNT              PIC S9(09) COMP-3            02550099
025600                                                VALUE ZERO.       02560099
025700 01  WS-WE341Y1-KEY-FIELDS.                                       02570099
025800     05  WS-WE341Y1-KEY1-FIELDS.                                  02580099
025900         10  WS-WE341Y1-TAX-YR-DT    PIC S9(04) COMP-3            02590099
026000                                                VALUE ZERO.       02600099
026100         10  WS-WE341Y1-FUND-CODE    PIC S9(07) COMP-3            02610099
026200                                                VALUE ZERO.       02620099
026300         10  WS-WE341Y1-ACCT-NO      PIC S9(11) COMP-3            02630099
026400                                                VALUE ZERO.       02640099
026500     05  WS-WE341Y1-ACCUM-TYPE       PIC X(01)  VALUE SPACES.     02650099
026600                                                                  02660099
026700 01  WS-CURR-WE341Y1-KEY-FIELDS.                                  02670099
026800     05  WS-CURR-WE341Y1-KEY1-FIELDS.                             02680099
026900         10  WS-CURR-WE341Y1-TAX-YR-DT   PIC S9(04) COMP-3        02690099
027000                                                VALUE ZERO.       02700099
027100         10  WS-CURR-WE341Y1-FUND-CODE   PIC S9(07) COMP-3        02710099
027200                                                VALUE ZERO.       02720099
027300         10  WS-CURR-WE341Y1-ACCT-NO     PIC S9(11) COMP-3        02730099
027400                                                VALUE ZERO.       02740099
027500     05  WS-CURR-WE341Y1-ACCUM-TYPE      PIC X(01)                02750099
027600                                                VALUE SPACES.     02760099
027700                                                                  02770099
027800 01  WS-WE342Y1-KEY1-FIELDS.                                      02780099
027900     05  WS-WE342Y1-TAX-YR-DT        PIC S9(04) COMP-3            02790099
028000                                                VALUE ZERO.       02800099
028100     05  WS-WE342Y1-FUND-CODE        PIC S9(07) COMP-3            02810099
028200                                                VALUE ZERO.       02820099
028300     05  WS-WE342Y1-ACCT-NO          PIC S9(11) COMP-3            02830099
028400                                                VALUE ZERO.       02840099
028500 01  WS-SAVE-WE341Y1-W90-KEY.                                     02850099
028600     05  TAX-YR-DT               PIC S9(4)       COMP-3           02860099
028700                                            VALUE ZERO.           02870099
028800     05  FUND-CODE               PIC S9(7)       COMP-3           02880099
028900                                            VALUE ZERO.           02890099
029000     05  ACCOUNT-NUMBER          PIC S9(11)      COMP-3           02900099
029100                                            VALUE ZERO.           02910099
029200     05  ACCUMULATION-TYPE-CD    PIC X(01)  VALUE SPACES.         02920099
029300     05  INCOME-TYPE-CD          PIC S9(3)       COMP-3           02930099
029400                                            VALUE ZERO.           02940099
029500     05  TAX-RSP-ST-CNY-CD       PIC S9(7)       COMP-3           02950099
029600                                            VALUE ZERO.           02960099
029700     05  CH3-TAX-RT              PIC S9(5)V9(10) COMP-3           02970099
029800                                            VALUE ZERO.           02980099
029900     05  CH4-TAX-RT              PIC S9(5)V9(10) COMP-3           02990099
030000                                            VALUE ZERO.           03000099
030100     05  CH3-WITHHOLDING-CD      PIC X(01)  VALUE SPACE.          03010099
030200         88  CH3-WITHHOLDING-YES            VALUE 'Y'.            03020099
030300         88  CH3-WITHHOLDING-NO             VALUE 'N'.            03030099
030400     05  CH4-WITHHOLDING-CD      PIC X(01)  VALUE SPACE.          03040099
030500         88  CH4-WITHHOLDING-YES            VALUE 'Y'.            03050099
030600         88  CH4-WITHHOLDING-NO             VALUE 'N'.            03060099
030700     05  CH3-EXEMPTION-CD        PIC X(02)  VALUE SPACE.          03070099
030800     05  CH4-EXEMPTION-CD        PIC X(02)  VALUE SPACE.          03080099
030900     05  TAX-RSP-CH3-STA-CODE-TYP-ID                              03090099
031000                                 PIC S9(5)       COMP-3           03100099
031100                                            VALUE ZERO.           03110099
031200     05  TAX-RSP-CH3-STA-CODE-ID PIC X(20)  VALUE SPACE.          03120099
031300     05  TAX-RSP-CH4-STA-CODE-TYP-ID                              03130099
031400                                 PIC S9(5)       COMP-3           03140099
031500                                            VALUE ZERO.           03150099
031600     05  TAX-RSP-CH4-STA-CODE-ID PIC X(20)  VALUE SPACE.          03160099
031700     05  LMT-ON-BEN-CD           PIC X(5)   VALUE SPACE.          03170099
031800                                                                  03180099
036410 01  WS-SAVE2-WE341Y1-W90-KEY2.                                   03641001
036420     05  TAX-YR-DT               PIC S9(4)       COMP-3           03642001
036430                                            VALUE ZERO.           03643001
036440     05  FUND-CODE               PIC S9(7)       COMP-3           03644001
036450                                            VALUE ZERO.           03645001
036460     05  ACCOUNT-NUMBER          PIC S9(11)      COMP-3           03646001
036470                                            VALUE ZERO.           03647001
036480     05  ACCUMULATION-TYPE-CD    PIC X(01)  VALUE SPACES.         03648001
036490     05  INCOME-TYPE-CD          PIC S9(3)       COMP-3           03649001
036491                                            VALUE ZERO.           03649101
036492     05  TAX-RSP-ST-CNY-CD       PIC S9(7)       COMP-3           03649201
036493                                            VALUE ZERO.           03649301
036494     05  CH3-TAX-RT              PIC S9(5)V9(10) COMP-3           03649401
036495                                            VALUE ZERO.           03649501
036496     05  CH4-TAX-RT              PIC S9(5)V9(10) COMP-3           03649601
036497                                            VALUE ZERO.           03649701
036498     05  CH3-WITHHOLDING-CD      PIC X(01)  VALUE SPACE.          03649801
036499         88  CH3-WITHHOLDING-YES            VALUE 'Y'.            03649901
036500         88  CH3-WITHHOLDING-NO             VALUE 'N'.            03650001
036501     05  CH4-WITHHOLDING-CD      PIC X(01)  VALUE SPACE.          03650101
036502         88  CH4-WITHHOLDING-YES            VALUE 'Y'.            03650201
036503         88  CH4-WITHHOLDING-NO             VALUE 'N'.            03650301
036504     05  CH3-EXEMPTION-CD        PIC X(02)  VALUE SPACE.          03650401
036505     05  CH4-EXEMPTION-CD        PIC X(02)  VALUE SPACE.          03650501
036506     05  TAX-RSP-CH3-STA-CODE-TYP-ID                              03650601
036507                                 PIC S9(5)       COMP-3           03650701
036508                                            VALUE ZERO.           03650801
036509     05  TAX-RSP-CH3-STA-CODE-ID PIC X(20)  VALUE SPACE.          03650901
036510     05  TAX-RSP-CH4-STA-CODE-TYP-ID                              03651001
036511                                 PIC S9(5)       COMP-3           03651101
036512                                            VALUE ZERO.           03651201
036513     05  TAX-RSP-CH4-STA-CODE-ID PIC X(20)  VALUE SPACE.          03651301
036514     05  LMT-ON-BEN-CD           PIC X(5)   VALUE SPACE.          03651401
036515                                                                  03651501
031900 01  WS-SAVE-W90-KEY.                                             03190099
036600     05  TAX-YR-DT               PIC S9(4)       COMP-3           03660000
036700                                            VALUE ZERO.           03670000
036800     05  FUND-CODE               PIC S9(7)       COMP-3           03680000
036900                                            VALUE ZERO.           03690000
037000     05  ACCOUNT-NUMBER          PIC S9(11)      COMP-3           03700000
037100                                            VALUE ZERO.           03710000
037200     05  ACCUMULATION-TYPE-CD    PIC X(01)  VALUE SPACES.         03720000
037300     05  INCOME-TYPE-CD          PIC S9(3)       COMP-3           03730000
037400                                            VALUE ZERO.           03740000
037500     05  TAX-RSP-ST-CNY-CD       PIC S9(7)       COMP-3           03750000
037600                                            VALUE ZERO.           03760000
037700     05  CH3-TAX-RT              PIC S9(5)V9(10) COMP-3           03770000
037800                                            VALUE ZERO.           03780000
037900     05  CH4-TAX-RT              PIC S9(5)V9(10) COMP-3           03790000
038000                                            VALUE ZERO.           03800000
038100     05  CH3-WITHHOLDING-CD      PIC X(01)  VALUE SPACE.          03810000
038200         88  CH3-WITHHOLDING-YES            VALUE 'Y'.            03820000
038300         88  CH3-WITHHOLDING-NO             VALUE 'N'.            03830000
038400     05  CH4-WITHHOLDING-CD      PIC X(01)  VALUE SPACE.          03840000
038500         88  CH4-WITHHOLDING-YES            VALUE 'Y'.            03850000
038600         88  CH4-WITHHOLDING-NO             VALUE 'N'.            03860000
038700     05  CH3-EXEMPTION-CD        PIC X(02)  VALUE SPACE.          03870000
038800     05  CH4-EXEMPTION-CD        PIC X(02)  VALUE SPACE.          03880000
038900     05  TAX-RSP-CH3-STA-CODE-TYP-ID                              03890000
039000                                 PIC S9(5)       COMP-3           03900000
039100                                            VALUE ZERO.           03910000
039200     05  TAX-RSP-CH3-STA-CODE-ID PIC X(20)  VALUE SPACE.          03920000
039300     05  TAX-RSP-CH4-STA-CODE-TYP-ID                              03930000
039400                                 PIC S9(5)       COMP-3           03940000
039500                                            VALUE ZERO.           03950000
039600     05  TAX-RSP-CH4-STA-CODE-ID PIC X(20)  VALUE SPACE.          03960000
039700     05  LMT-ON-BEN-CD           PIC X(5)   VALUE SPACE.          03970000
039800                                                                  03980002
039810 01  WS-SAVE-W90-STATUS-2.                                        03981001
039820     05  TAX-YR-DT               PIC S9(4)       COMP-3           03982001
039830                                            VALUE ZERO.           03983001
039840     05  FUND-CODE               PIC S9(7)       COMP-3           03984001
039850                                            VALUE ZERO.           03985001
039860     05  ACCOUNT-NUMBER          PIC S9(11)      COMP-3           03986001
039870                                            VALUE ZERO.           03987001
039880     05  ACCUMULATION-TYPE-CD    PIC X(01)  VALUE SPACES.         03988001
039890     05  INCOME-TYPE-CD          PIC S9(3)       COMP-3           03989001
039891                                            VALUE ZERO.           03989101
039892     05  TAX-RSP-ST-CNY-CD       PIC S9(7)       COMP-3           03989201
039893                                            VALUE ZERO.           03989301
039894     05  CH3-TAX-RT              PIC S9(5)V9(10) COMP-3           03989401
039895                                            VALUE ZERO.           03989501
039896     05  CH4-TAX-RT              PIC S9(5)V9(10) COMP-3           03989601
039897                                            VALUE ZERO.           03989701
039898     05  CH3-WITHHOLDING-CD      PIC X(01)  VALUE SPACE.          03989801
039899         88  CH3-WITHHOLDING-YES            VALUE 'Y'.            03989901
039900         88  CH3-WITHHOLDING-NO             VALUE 'N'.            03990001
039901     05  CH4-WITHHOLDING-CD      PIC X(01)  VALUE SPACE.          03990101
039902         88  CH4-WITHHOLDING-YES            VALUE 'Y'.            03990201
039903         88  CH4-WITHHOLDING-NO             VALUE 'N'.            03990301
039904     05  CH3-EXEMPTION-CD        PIC X(02)  VALUE SPACE.          03990401
039905     05  CH4-EXEMPTION-CD        PIC X(02)  VALUE SPACE.          03990501
039906     05  TAX-RSP-CH3-STA-CODE-TYP-ID                              03990601
039907                                 PIC S9(5)       COMP-3           03990701
039908                                            VALUE ZERO.           03990801
039909     05  TAX-RSP-CH3-STA-CODE-ID PIC X(20)  VALUE SPACE.          03990901
039910     05  TAX-RSP-CH4-STA-CODE-TYP-ID                              03991001
039911                                 PIC S9(5)       COMP-3           03991101
039912                                            VALUE ZERO.           03991201
039913     05  TAX-RSP-CH4-STA-CODE-ID PIC X(20)  VALUE SPACE.          03991301
039914     05  LMT-ON-BEN-CD           PIC X(5)   VALUE SPACE.          03991401
039915                                                                  03991502
039916 01  WS-SAVE-W90-STATUS-3.                                        03991601
032000     05  TAX-YR-DT               PIC S9(4)       COMP-3           03200099
032100                                            VALUE ZERO.           03210099
032200     05  FUND-CODE               PIC S9(7)       COMP-3           03220099
032300                                            VALUE ZERO.           03230099
032400     05  ACCOUNT-NUMBER          PIC S9(11)      COMP-3           03240099
032500                                            VALUE ZERO.           03250099
032600     05  ACCUMULATION-TYPE-CD    PIC X(01)  VALUE SPACES.         03260099
032700     05  INCOME-TYPE-CD          PIC S9(3)       COMP-3           03270099
032800                                            VALUE ZERO.           03280099
032900     05  TAX-RSP-ST-CNY-CD       PIC S9(7)       COMP-3           03290099
033000                                            VALUE ZERO.           03300099
033100     05  CH3-TAX-RT              PIC S9(5)V9(10) COMP-3           03310099
033200                                            VALUE ZERO.           03320099
033300     05  CH4-TAX-RT              PIC S9(5)V9(10) COMP-3           03330099
033400                                            VALUE ZERO.           03340099
033500     05  CH3-WITHHOLDING-CD      PIC X(01)  VALUE SPACE.          03350099
033600         88  CH3-WITHHOLDING-YES            VALUE 'Y'.            03360099
033700         88  CH3-WITHHOLDING-NO             VALUE 'N'.            03370099
033800     05  CH4-WITHHOLDING-CD      PIC X(01)  VALUE SPACE.          03380099
033900         88  CH4-WITHHOLDING-YES            VALUE 'Y'.            03390099
034000         88  CH4-WITHHOLDING-NO             VALUE 'N'.            03400099
034100     05  CH3-EXEMPTION-CD        PIC X(02)  VALUE SPACE.          03410099
034200     05  CH4-EXEMPTION-CD        PIC X(02)  VALUE SPACE.          03420099
034300     05  TAX-RSP-CH3-STA-CODE-TYP-ID                              03430099
034400                                 PIC S9(5)       COMP-3           03440099
034500                                            VALUE ZERO.           03450099
034600     05  TAX-RSP-CH3-STA-CODE-ID PIC X(20)  VALUE SPACE.          03460099
034700     05  TAX-RSP-CH4-STA-CODE-TYP-ID                              03470099
034800                                 PIC S9(5)       COMP-3           03480099
034900                                            VALUE ZERO.           03490099
035000     05  TAX-RSP-CH4-STA-CODE-ID PIC X(20)  VALUE SPACE.          03500099
035100     05  LMT-ON-BEN-CD           PIC X(5)   VALUE SPACE.          03510099
039200                                                                  03920099
042600 01  WS-SAVE-CURRENT-W90-KEY.                                     04260099
042700     05  TAX-YR-DT               PIC S9(4)       COMP-3           04270099
042800                                            VALUE ZERO.           04280099
042900     05  FUND-CODE               PIC S9(7)       COMP-3           04290099
043000                                            VALUE ZERO.           04300099
043100     05  ACCOUNT-NUMBER          PIC S9(11)      COMP-3           04310099
043200                                            VALUE ZERO.           04320099
043300     05  ACCUMULATION-TYPE-CD    PIC X(01)  VALUE SPACES.         04330099
043400     05  INCOME-TYPE-CD          PIC S9(3)       COMP-3           04340099
043500                                            VALUE ZERO.           04350099
043600     05  TAX-RSP-ST-CNY-CD       PIC S9(7)       COMP-3           04360099
043700                                            VALUE ZERO.           04370099
043800     05  CH3-TAX-RT              PIC S9(5)V9(10) COMP-3           04380099
043900                                            VALUE ZERO.           04390099
044000     05  CH4-TAX-RT              PIC S9(5)V9(10) COMP-3           04400099
044100                                            VALUE ZERO.           04410099
044200     05  CH3-WITHHOLDING-CD      PIC X(01)  VALUE SPACE.          04420099
044300         88  CH3-WITHHOLDING-YES            VALUE 'Y'.            04430099
044400         88  CH3-WITHHOLDING-NO             VALUE 'N'.            04440099
044500     05  CH4-WITHHOLDING-CD      PIC X(01)  VALUE SPACE.          04450099
044600         88  CH4-WITHHOLDING-YES            VALUE 'Y'.            04460099
044700         88  CH4-WITHHOLDING-NO             VALUE 'N'.            04470099
044800     05  CH3-EXEMPTION-CD        PIC X(02)  VALUE SPACE.          04480099
044900     05  CH4-EXEMPTION-CD        PIC X(02)  VALUE SPACE.          04490099
045000     05  TAX-RSP-CH3-STA-CODE-TYP-ID                              04500099
045100                                 PIC S9(5)       COMP-3           04510099
045200                                            VALUE ZERO.           04520099
045300     05  TAX-RSP-CH3-STA-CODE-ID PIC X(20)  VALUE SPACE.          04530099
045400     05  TAX-RSP-CH4-STA-CODE-TYP-ID                              04540099
045500                                 PIC S9(5)       COMP-3           04550099
045600                                            VALUE ZERO.           04560099
045700     05  TAX-RSP-CH4-STA-CODE-ID PIC X(20)  VALUE SPACE.          04570099
045800     05  LMT-ON-BEN-CD           PIC X(5)   VALUE SPACE.          04580099
045900                                                                  04590099
046000 01  WS-MISC-WORK-AREA.                                           04600099
046200     05 WS-OLD-SSN               PIC S9(9)      COMP-3 VALUE +0.  04620099
046300     05 WS-NEW-SSN               PIC S9(9)      COMP-3 VALUE +0.  04630099
046400     05 WS-NEW-SSN-STA-2         PIC S9(9)      COMP-3 VALUE +0.  04640099
046500     05 WS-OLD-SSN-STA-3         PIC S9(9)      COMP-3 VALUE +0.  04650099
046600     05 WS-NEW-SSN-STA-4         PIC S9(9)      COMP-3 VALUE +0.  04660099
046700     05 WS-OLD-SSN-STA-5         PIC S9(9)      COMP-3 VALUE +0.  04670099
046800     05 WS-NEXT-UNIQUE-FORM-ID   PIC S9(10)     COMP-3 VALUE +0.  04680099
046900     05 WS-REPORTING-STATUS-CD   PIC X(1)       VALUE SPACE.      04690099
043400        88  WS-REPORTING-NOT-CREATED            VALUE '0'.        04340001
047000        88  WS-REPORTING-PRODUCED               VALUE '1'.        04700099
047100        88  WS-REPORTING-CORR-PRODUCED          VALUE '4'.        04710099
047200        88  WS-REPORTING-ZERO-CORR-PRD          VALUE '5'.        04720099
047300     05 WS-CUR-AMENDMENT-NBR     PIC S9(3)      COMP-3 VALUE +0.  04730099
047400     05 WS-TAX-RSP-TAX-ID        PIC S9(9)      COMP-3            04740099
047500                                                VALUE +0.         04750099
047600     05 WS-SAVE-UNIQUE-FORM-ID   PIC S9(10)     COMP-3            04760099
047700                                                VALUE +0.         04770099
044300     05 WS-SAVE-TAX-YR-DT        PIC S9(4)      COMP-3 VALUE +0.  04430001
044400     05 WS-SAVE-FUND-CODE        PIC S9(7)      COMP-3 VALUE +0.  04440001
044500     05 WS-SAVE-ACCOUNT-NUMBER   PIC S9(11)     COMP-3 VALUE +0.  04450001
044600     05 WS-SAVE-ACCUMULATION-TYPE-CD                              04460001
044700                                 PIC X(01)      VALUE SPACES.     04470001
044800     05 WS-SAVE-MFA-1042S-RPT-ITEM-ID                             04480001
044900                                 PIC S9(7)      COMP-3 VALUE +0.  04490001
045000     05 WS-SAVE-ADD-DT-TM        PIC X(26)      VALUE SPACES.     04500001
047800                                                                  04780099
047900 01  WS-JOB-NAME                     PIC X(08)  VALUE SPACES.     04790099
048000 01  WS-JOB-ID                       PIC X(08)  VALUE SPACES.     04800099
048100 01  WS-SWITCH.                                                   04810099
048200     05  WS-WE342Y1-EOF-CD           PIC X      VALUE 'N'.        04820099
048300         88  WS-WE342Y1-EOF-YES                 VALUE 'Y'.        04830099
048400         88  WS-WE342Y1-EOF-NO                  VALUE 'N'.        04840099
048500     05  WS-ACTION-CD                PIC X(01)  VALUE 'N'.        04850099
048600         88  WS-NO-ACTION                       VALUE 'N'.        04860099
048700         88  WS-CORRECTED-ACTION                VALUE 'A'.        04870099
048800         88  WS-UPDATE-ACTION                   VALUE 'U'.        04880099
048900     05  WS-DELETE-ACTION-CD         PIC X      VALUE 'N'.        04890099
049000         88  WS-DELETE-ACTION-YES               VALUE 'Y'.        04900099
049100         88  WS-DELETE-ACTION-NO                VALUE 'N'.        04910099
049200     05  WS-WE341Y1-EOF-CD           PIC X      VALUE 'N'.        04920099
049300         88  WS-WE341Y1-EOF-YES                 VALUE 'Y'.        04930099
049400         88  WS-WE341Y1-EOF-NO                  VALUE 'N'.        04940099
049500     05  WS-W90-EOC-CD               PIC X      VALUE 'N'.        04950099
049600         88  WS-W90-EOC-YES                     VALUE 'Y'.        04960099
049700         88  WS-W90-EOC-NO                      VALUE 'N'.        04970099
049800     05  WS-W92-EOC-CD               PIC X      VALUE 'N'.        04980099
049900         88  WS-W92-EOC-YES                     VALUE 'Y'.        04990099
050000         88  WS-W92-EOC-NO                      VALUE 'N'.        05000099
050100     05  WS-W90-W92-EOC-CD           PIC X      VALUE 'N'.        05010099
050200         88  WS-W90-W92-EOC-YES                 VALUE 'Y'.        05020099
050300         88  WS-W90-W92-EOC-NO                  VALUE 'N'.        05030099
050400     05  WS-STATUS-CODE              PIC X(01)  VALUE SPACES.     05040099
050500         88  WS-STATUS-0                        VALUE '0'.        05050099
050600         88  WS-STATUS-2                        VALUE '2'.        05060099
050700         88  WS-STATUS-3                        VALUE '3'.        05070099
050800     05  WS-W92-CHILD-EXIST-CD       PIC X      VALUE 'N'.        05080099
050900         88  WS-W92-CHILD-EXIST-YES             VALUE 'Y'.        05090099
051000         88  WS-W92-CHILD-EXIST-NO              VALUE 'N'.        05100099
051100                                                                  05110099
051200     05  WS-WE341Y1-KEY-CHANGE-CD    PIC X      VALUE 'N'.        05120099
051300         88  WS-WE341Y1-KEY-CHANGE-YES          VALUE 'Y'.        05130099
051400         88  WS-WE341Y1-KEY-CHANGE-NO           VALUE 'N'.        05140099
051500     05  WS-STATUS-0-EXIST-CD        PIC X(01)  VALUE 'N'.        05150099
051600         88  WS-STATUS-0-EXIST-YES              VALUE 'Y'.        05160099
051700         88  WS-STATUS-0-EXIST-NO               VALUE 'N'.        05170099
051800     05  WS-STATUS-0-CMR-CD          PIC X      VALUE 'N'.        05180099
051900         88  WS-STATUS-0-CMR-YES                VALUE 'Y'.        05190099
052000         88  WS-STATUS-0-CMR-NO                 VALUE 'N'.        05200099
052100     05  WS-STATUS-0-IRS-CD          PIC X      VALUE 'N'.        05210099
052200         88  WS-STATUS-0-IRS-YES                VALUE 'Y'.        05220099
052300         88  WS-STATUS-0-IRS-NO                 VALUE 'N'.        05230099
052400     05  WS-STATUS-FOUND-CD          PIC X      VALUE 'N'.        05240099
052500         88  WS-STATUS-FOUND-YES                VALUE 'Y'.        05250099
052600         88  WS-STATUS-FOUND-NO                 VALUE 'N'.        05260099
052700     05  WS-SSN-CHANGE-CD            PIC X      VALUE 'N'.        05270099
052800         88  WS-SSN-CHANGE-YES                  VALUE 'Y'.        05280099
052900         88  WS-SSN-CHANGE-NO                   VALUE 'N'.        05290099
053000     05  WS-TWO-STEP-CD              PIC X      VALUE 'N'.        05300099
053100         88  WS-TWO-STEP-YES                    VALUE 'Y'.        05310099
053200         88  WS-TWO-STEP-NO                     VALUE 'N'.        05320099
053600     05  WS-INPUT-MATCH-OLD-SSN-CD   PIC X      VALUE 'N'.        05360099
053700         88  WS-INPUT-MATCH-OLD-SSN-YES         VALUE 'Y'.        05370099
053800         88  WS-INPUT-MATCH-OLD-SSN-NO          VALUE 'N'.        05380099
053900     05  WS-W90-W92-ACCM-EOC-CD      PIC X      VALUE 'N'.        05390099
054000         88  WS-W90-W92-ACCM-EOC-YES            VALUE 'Y'.        05400099
054100         88  WS-W90-W92-ACCM-EOC-NO             VALUE 'N'.        05410099
054200     05  WS-WE341Y1-ACCM-CHANGE-CD   PIC X      VALUE 'N'.        05420099
054300         88  WS-WE341Y1-ACCM-CHANGE-YES         VALUE 'Y'.        05430099
054400         88  WS-WE341Y1-ACCM-CHANGE-NO          VALUE 'N'.        05440099
054500     05  WS-KEY-EXIST-CD             PIC X      VALUE 'N'.        05450099
054600         88  WS-KEY-EXIST-YES                   VALUE 'Y'.        05460099
054700         88  WS-KEY-EXIST-NO                    VALUE 'N'.        05470099
054800     05  WS-INSERT-NEW-SSN-CD        PIC X(07)  VALUE 'N'.        05480099
054900         88  WS-INSERT-NEW-SSN-YES              VALUE 'Y'.        05490099
055000         88  WS-INSERT-NEW-SSN-NO               VALUE 'N'.        05500099
055100     05  WS-STATUS-2-EXIST-CD        PIC X(07)  VALUE 'N'.        05510099
055200         88  WS-STATUS-2-EXIST-YES              VALUE 'Y'.        05520099
055300         88  WS-STATUS-2-EXIST-NO               VALUE 'N'.        05530099
055400     05  WS-STATUS-3-EXIST-CD        PIC X(07)  VALUE 'N'.        05540099
055500         88  WS-STATUS-3-EXIST-YES              VALUE 'Y'.        05550099
055600         88  WS-STATUS-3-EXIST-NO               VALUE 'N'.        05560099
055700     05  WS-STATUS-4-EXIST-CD        PIC X(07)  VALUE 'N'.        05570099
055800         88  WS-STATUS-4-EXIST-YES              VALUE 'Y'.        05580099
055900         88  WS-STATUS-4-EXIST-NO               VALUE 'N'.        05590099
056000     05  WS-STATUS-5-EXIST-CD        PIC X(07)  VALUE 'N'.        05600099
056100         88  WS-STATUS-5-EXIST-YES              VALUE 'Y'.        05610099
056200         88  WS-STATUS-5-EXIST-NO               VALUE 'N'.        05620099
056300     05  WS-CHECK-TWO-STEP-RPT-CD    PIC X(07)  VALUE 'N'.        05630099
056400         88  WS-CHECK-TWO-STEP-RPT-YES          VALUE 'Y'.        05640099
056500         88  WS-CHECK-TWO-STEP-RPT-NO           VALUE 'N'.        05650099
056600     05  WS-SSN-FOUND-CD             PIC X(07)  VALUE 'N'.        05660099
056700         88  WS-SSN-FOUND-YES                   VALUE 'Y'.        05670099
056800         88  WS-SSN-FOUND-NO                    VALUE 'N'.        05680099
053800     05  WS-STATUS-2-SSN-FOUND-CD    PIC X(07)  VALUE 'N'.        05380000
053810         88  WS-STATUS-2-SSN-FOUND-YES          VALUE 'Y'.        05381000
053820         88  WS-STATUS-2-SSN-FOUND-NO           VALUE 'N'.        05382000
053830     05  WS-STATUS-3-SSN-FOUND-CD    PIC X(07)  VALUE 'N'.        05383000
053840         88  WS-STATUS-3-SSN-FOUND-YES          VALUE 'Y'.        05384000
053850         88  WS-STATUS-3-SSN-FOUND-NO           VALUE 'N'.        05385000
056900     05  WS-FUNCTION                 PIC X(07)  VALUE SPACE.      05690099
057000         88  WS-INSERT                          VALUE 'INSERT '.  05700099
057100         88  WS-UPDATE                          VALUE 'UPDATE '.  05710099
057200         88  WS-DELETE                          VALUE 'DELETE '.  05720099
057300     05  WS-TABLE                    PIC X(07)  VALUE SPACE.      05730099
057400         88  WS-W90                             VALUE 'W90    '.  05740099
057500         88  WS-W92                             VALUE 'W92    '.  05750099
057600     05  WS-SSN-CHANGE-PROCESS       PIC X(02)  VALUE SPACE.      05760099
057700         88  WS-SSN-CHANGE-ONE-STEP             VALUE ' 1'.       05770099
057800         88  WS-SSN-CHANGE-TWO-STEP             VALUE ' 2'.       05780099
057900         88  WS-SSN-CHANGE-TWO-STEP-RPT         VALUE '2R'.       05790099
058000     05  WS-STATUS-4-SEL-CD          PIC X(01)  VALUE 'N'.        05800099
058100         88  WS-STATUS-4-SEL-YES                VALUE 'Y'.        05810099
058200         88  WS-STATUS-4-SEL-NO                 VALUE 'N'.        05820099
058300     05  WS-STATUS-5-SEL-CD          PIC X(01)  VALUE 'N'.        05830099
058400         88  WS-STATUS-5-SEL-YES                VALUE 'Y'.        05840099
058500         88  WS-STATUS-5-SEL-NO                 VALUE 'N'.        05850099
058600     05  WS-CHANGED-SSN-CD           PIC X(01)  VALUE 'N'.        05860099
058700         88  WS-CHANGED-SSN-YES                 VALUE 'Y'.        05870099
058800         88  WS-CHANGED-SSN-NO                  VALUE 'N'.        05880099
058900     05  WS-PARTIAL-REALLOCATE-CD    PIC X(01)  VALUE 'N'.        05890099
059000         88  WS-PARTIAL-REALLOCATE-YES          VALUE 'Y'.        05900099
059100         88  WS-PARTIAL-REALLOCATE-NO           VALUE 'N'.        05910099
059200     05  WS-FOUND-PREV-UNIQUE-CD     PIC X(01)  VALUE 'N'.        05920099
059300         88  WS-FOUND-PREV-UNIQUE-YES           VALUE 'Y'.        05930099
059400         88  WS-FOUND-PREV-UNIQUE-NO            VALUE 'N'.        05940099
059500     05  WS-FOUND-PREV-SSN-CD        PIC X(01)  VALUE 'N'.        05950099
059600         88  WS-FOUND-PREV-SSN-YES              VALUE 'Y'.        05960099
059700         88  WS-FOUND-PREV-SSN-NO               VALUE 'N'.        05970099
059800     05  WS-UNIQUE-EOF-CD            PIC X(01)  VALUE 'N'.        05980099
059900         88  WS-UNIQUE-EOF-YES                  VALUE 'Y'.        05990099
060000         88  WS-UNIQUE-EOF-NO                   VALUE 'N'.        06000099
060400     05  WS-FOUND-W90-KEYS-CD          PIC X(01)  VALUE 'N'.      06040099
060500         88  WS-FOUND-W90-KEYS-YES                VALUE 'Y'.      06050099
060600         88  WS-FOUND-W90-KEYS-NO                 VALUE 'N'.      06060099
057210     05  WS-INPUT-LESS-THAN-W90-CD     PIC X(01)  VALUE 'N'.      05721001
057220         88  WS-INPUT-LESS-THAN-W90-YES           VALUE 'Y'.      05722001
057230         88  WS-INPUT-LESS-THAN-W90-NO            VALUE 'N'.      05723001
057240     05  WS-PARTIAL-ALLOCATE-CD        PIC X(01)  VALUE 'N'.      05724001
057250         88  WS-PARTIAL-ALLOCATE-YES              VALUE 'Y'.      05725001
057260         88  WS-PARTIAL-ALLOCATE-NO               VALUE 'N'.      05726001
057270     05  WS-SELECT-W92-CD              PIC X(01)  VALUE 'N'.      05727001
057280         88  WS-SELECT-W92-YES                    VALUE 'Y'.      05728001
057290         88  WS-SELECT-W92-NO                     VALUE 'N'.      05729001
060700                                                                  06070099
060800* (WS00488C)                                                      06080099
060900* FOLLOWING IS THE DELIMITER USED BY QUICKSTART TO MARK THE       06090099
061000* END OF THE WORKING STORAGE SAVE AREA.  ANY COBOL DATA AREAS     06100099
061100* APPEARING AFTER THIS DELIMITER ARE NOT RESTORED TO THE LAST     06110099
061200* CHECKPOINT VALUE DURING A RESTART, UNLESS MULTIPLE SAVE AREAS   06120099
061300* ARE USED.                                                       06130099
061400*                                                                 06140099
061500* NOTE: ALWAYS INCLUDE IN THE WORKING STORAGE SAVE AREA ANY DATA  06150099
061600*       AREAS FOR WHICH THERE IS ANY DOUBT TO WHETHER OR NOT      06160099
061700*       IT BELONGS IN THE SAVE AREA.                              06170099
061800                                                                  06180099
061900 01  CKPT-AREA-END                   PIC X(20)  VALUE             06190099
062000                  '** CKPT AREA END **'.                          06200099
062100                                                                  06210099
062200 01  WS-MISC-FIELDS.                                              06220099
062300     05  WS-B27935                   PIC X(08)  VALUE 'B27935'.   06230099
062400     05  WS-ONE                      PIC S9(03) COMP-3            06240099
062500                                                VALUE +1.         06250099
062600 01  WS-CURRENT-DATE.                                             06260099
062700     05  WS-CURRENT-YYYY             PIC X(04)  VALUE SPACES.     06270099
062800     05  FILLER                      PIC X(01)  VALUE '-'.        06280099
062900     05  WS-CURRENT-MM               PIC X(02)  VALUE SPACES.     06290099
063000     05  FILLER                      PIC X(01)  VALUE '-'.        06300099
063100     05  WS-CURRENT-DD               PIC X(02)  VALUE SPACES.     06310099
063200                                                                  06320099
063300 01  SUBROUTINE-NAMES.                                            06330099
063400     05  SR0002                      PIC X(8)   VALUE 'SR0002  '. 06340099
063500     05  SR0009                      PIC X(8)   VALUE 'SR0009  '. 06350099
063600     05  SR0011                      PIC X(8)   VALUE 'SR0011  '. 06360099
063700     05  SR0622                      PIC X(8)   VALUE 'SR0622  '. 06370099
063800     05  SR1184                      PIC X(8)   VALUE 'SR1184  '. 06380099
063900                                                                  06390099
064000 01  SR0009-PTR      USAGE PROCEDURE-POINTER VALUE NULL.          06400099
064100 01  SR0622-PTR      USAGE PROCEDURE-POINTER VALUE NULL.          06410099
064200 01  SR1184-PTR      USAGE PROCEDURE-POINTER VALUE NULL.          06420099
064300                                                                  06430099
064400 COPY PSR0009C.                                                   06440099
064500 COPY PSR0011C REPLACING SR0011-PARM-AREA                         06450099
064600                      BY PSR0011.                                 06460099
064700 COPY PSR0622C.                                                   06470099
064800 COPY PSR1184C.                                                   06480099
064900                                                                  06490099
065000 COPY WS00293C REPLACING == WS00293==                             06500099
065100                      BY == 100-1042S-RPT-INFO-FILE-STATUS==.     06510099
065200                                                                  06520099
065300 COPY WS00293C REPLACING == WS00293==                             06530099
065400                      BY == 110-ACCT-DRIVER-FILE-STATUS==.        06540099
065500                                                                  06550099
065600 COPY W92A999C REPLACING == MFS-W92-A999==                        06560099
065700                      BY == WS-CURR-W92-REC==.                    06570099
065800                                                                  06580099
065900 COPY W92A999C REPLACING == MFS-W92-A999==                        06590099
066000                      BY == WS-DEL-W92-REC==.                     06600099
066100                                                                  06610099
066200 COPY W92A999C REPLACING == MFS-W92-A999==                        06620099
066300                      BY == WS-SEL-W92-REC==.                     06630099
066400                                                                  06640099
066500 COPY W90A999C REPLACING == MFS-W90-A999==                        06650099
066600                      BY == WS-CURR-W90-REC==.                    06660099
066700                                                                  06670099
066800 COPY W90A999C REPLACING == MFS-W90-A999==                        06680099
066900                      BY == WS-DEL-W90-REC==.                     06690099
067000                                                                  06700099
067100 COPY WRKE341C REPLACING == WRKE341==                             06710099
067200                      BY == WS-HOLD-WE341Y1==.                    06720099
067300                                                                  06730099
067400 COPY W92A999C REPLACING == MFS-W92-A999==                        06740099
067500                      BY == WS-STATUS-23-REC==.                   06750099
067600                                                                  06760099
067700******************************************************************06770099
067800* DB2 AREA                                                       *06780099
067900******************************************************************06790099
068000                                                                  06800099
068100     EXEC SQL INCLUDE SQLCA    END-EXEC.                          06810099
068200     EXEC SQL INCLUDE WS00575C END-EXEC.                          06820099
068300     EXEC SQL INCLUDE QS1A999C END-EXEC.                          06830099
068400     EXEC SQL INCLUDE QS1A999S END-EXEC.                          06840099
068500     EXEC SQL INCLUDE W90A999C END-EXEC.                          06850099
068600     EXEC SQL INCLUDE W90A999S END-EXEC.                          06860099
068700     EXEC SQL INCLUDE W92A999C END-EXEC.                          06870099
068800     EXEC SQL INCLUDE W92A999S END-EXEC.                          06880099
068900                                                                  06890099
069000     EXEC SQL                                                     06900099
069100       DECLARE W90_W92_CURSOR                                     06910099
069200        CURSOR WITH HOLD                                          06920099
069300       FOR                                                        06930099
069400       SELECT                                                     06940099
069500             W90.ACCUMULATION_TYPE_CD                             06950099
069600            ,W90.MFA_1042S_RPT_ITEM_ID                            06960099
069700            ,W90.LAST_MNT_OPID                                    06970099
069800            ,W90.LAST_MNT_DATE_TIME                               06980099
069900            ,W90.TAX_RSP_ST_CNY_CD                                06990099
070000            ,W90.INCOME_TYPE_CD                                   07000099
063400            ,W90.TAX_RSP_TAX_ID                                   06340007
070200            ,W90.CH3_TAX_RT                                       07020099
070300            ,W90.CH4_TAX_RT                                       07030099
070400            ,W90.CH3_WITHHOLDING_CD                               07040099
070500            ,W90.CH4_WITHHOLDING_CD                               07050099
063900            ,W90.CH3_EXEMPTION_CD                                 06390007
064000            ,W90.CH4_EXEMPTION_CD                                 06400007
064100            ,W90.TAX_RSP_CH3_STA_CODE_TYP_ID                      06410007
064200            ,W90.TAX_RSP_CH3_STA_CODE_ID                          06420007
064300            ,W90.TAX_RSP_CH4_STA_CODE_TYP_ID                      06430007
064400            ,W90.TAX_RSP_CH4_STA_CODE_ID                          06440007
064500            ,W90.LMT_ON_BEN_CD                                    06450007
071300            ,W90.UNIQUE_FORM_ID                                   07130099
071400            ,W92.FUND_CODE                                        07140099
071500            ,W92.ACCOUNT_NUMBER                                   07150099
071600            ,W92.TAX_YR_DT                                        07160099
071700            ,W92.ACCUMULATION_TYPE_CD                             07170099
071800            ,W92.MFA_1042S_RPT_ITEM_ID                            07180099
071900            ,W92.ADD_DT_TM                                        07190099
072000            ,W92.LAST_MNT_OPID                                    07200099
072100            ,W92.LAST_MNT_DATE_TIME                               07210099
072200            ,W92.GROSS_INCOME_AT                                  07220099
072300            ,W92.TAX_WITHHOLDING_AT                               07230099
065700            ,W92.TAX_RSP_GIIN_EXTERNAL_ID                         06570007
065800            ,W92.REPORTING_STATUS_CD                              06580007
072600            ,W92.REPORTING_STATUS_DT                              07260099
072700            ,W92.NQI_EIN_ID                                       07270099
066100            ,W92.NQI_GIIN_EXTERNAL_ID                             06610007
066200            ,W92.NQI_STATE_COUNTRY_CD                             06620007
073000            ,W92.NQI_FOREIGN_TAX_ID                               07300099
066400            ,W92.TAX_RSP_FOREIGN_TAX_ID                           06640007
073200            ,W92.TAX_RSP_BIRTH_DT                                 07320099
066600            ,W92.NQI_CH3_STA_CODE_TYPE_ID                         06660007
066700            ,W92.NQI_CH3_STA_CODE_ID                              06670007
066800            ,W92.NQI_CH4_STA_CODE_TYPE_ID                         06680007
066900            ,W92.NQI_CH4_STA_CODE_ID                              06690007
073700            ,W92.ADD_JOB_ID                                       07370099
073800            ,W92.PAYEE_LINE_1_NM                                  07380099
073900            ,W92.PAYEE_LINE_2_NM                                  07390099
074000            ,W92.PAYEE_ADDRESS_1_TX                               07400099
074100            ,W92.PAYEE_CITY_NM                                    07410099
074200            ,W92.PAYEE_STATE_CD                                   07420099
074300            ,W92.PAYEE_CAN_PVN_CD                                 07430099
074400            ,W92.PYE_ADR_US_IRS_CD                                07440099
074500            ,W92.PAYEE_POSTAL_CD                                  07450099
074600            ,W92.ACCOUNT_TYPE_CD                                  07460099
074700            ,W92.NQI_LINE_1_NM                                    07470099
074800            ,W92.NQI_LINE_2_NM                                    07480099
074900            ,W92.NQI_LINE_3_NM                                    07490099
075000            ,W92.NQI_ADR_LINE_1_TX                                07500099
075100            ,W92.NQI_ADR_LINE_2_TX                                07510099
075200            ,W92.NQI_CITY_NM                                      07520099
075300            ,W92.NQI_CAN_PVN_CD                                   07530099
075400            ,W92.NQI_US_IRS_CD                                    07540099
075500            ,W92.NQI_ZIP_CD                                       07550099
075600            ,W92.NQI_RPT_TAX_ID                                   07560099
075700            ,W92.PAYER_TAX_ID                                     07570099
075800            ,W92.PAYER_NM                                         07580099
075900            ,W92.RECIPIENT_TYPE_CD                                07590099
076000            ,W92.AMENDMENT_NBR                                    07600099
076100        FROM                                                      07610099
076200             W90_A999           AS W90                            07620099
076300        INNER JOIN                                                07630099
076400             W92_A999           AS W92                            07640099
076500           ON  W90.ACCOUNT_NUMBER                                 07650099
076600             = W92.ACCOUNT_NUMBER                                 07660099
076700           AND W90.ACCUMULATION_TYPE_CD                           07670099
076800             = W92.ACCUMULATION_TYPE_CD                           07680099
076900           AND W90.FUND_CODE                                      07690099
077000             = W92.FUND_CODE                                      07700099
077100           AND W90.MFA_1042S_RPT_ITEM_ID                          07710099
077200             = W92.MFA_1042S_RPT_ITEM_ID                          07720099
077300           AND W90.TAX_YR_DT                                      07730099
077400             = W92.TAX_YR_DT                                      07740099
077500       WHERE W90.FUND_CODE                                        07750099
077600             = :MFS-W90-A999.FUND-CODE                            07760099
077700         AND W90.ACCOUNT_NUMBER                                   07770099
077800             = :MFS-W90-A999.ACCOUNT-NUMBER                       07780099
077900         AND W90.TAX_YR_DT                                        07790099
078000             = :MFS-W90-A999.TAX-YR-DT                            07800099
078100         AND W92.ADD_DT_TM                                        07810099
078200             = (SELECT                                            07820099
078300                       MAX(W92A.ADD_DT_TM)                        07830099
078400                  FROM                                            07840099
078500                       W92_A999 AS W92A                           07850099
078600                 WHERE                                            07860099
078700                       W92A.FUND_CODE                             07870099
078800                       = W92.FUND_CODE                            07880099
078900                   AND W92A.ACCOUNT_NUMBER                        07890099
079000                       = W92.ACCOUNT_NUMBER                       07900099
079100                   AND W92A.TAX_YR_DT                             07910099
079200                       = W92.TAX_YR_DT                            07920099
079300                   AND W92A.ACCUMULATION_TYPE_CD                  07930099
079400                       = W92.ACCUMULATION_TYPE_CD                 07940099
079500                   AND W92A.MFA_1042S_RPT_ITEM_ID                 07950099
079600                       = W92.MFA_1042S_RPT_ITEM_ID)               07960099
079700            ORDER BY                                              07970099
079800                   W90.TAX_YR_DT                                  07980099
079900                  ,W90.FUND_CODE                                  07990099
080000                  ,W90.ACCOUNT_NUMBER                             08000099
080100                  ,W90.ACCUMULATION_TYPE_CD                       08010099
080200                  ,W90.INCOME_TYPE_CD                             08020099
080300                  ,W90.TAX_RSP_ST_CNY_CD                          08030099
080400                  ,W90.CH3_TAX_RT                                 08040099
080500                  ,W90.CH4_TAX_RT                                 08050099
080600                  ,W90.CH3_WITHHOLDING_CD                         08060099
080700                  ,W90.CH4_WITHHOLDING_CD                         08070099
080800                  ,COALESCE(W90.CH3_EXEMPTION_CD,' ')             08080099
080900                  ,COALESCE(W90.CH4_EXEMPTION_CD,' ')             08090099
081000                  ,COALESCE(W90.TAX_RSP_CH3_STA_CODE_TYP_ID,0)    08100099
081100                  ,COALESCE(W90.TAX_RSP_CH3_STA_CODE_ID,' ')      08110099
081200                  ,COALESCE(W90.TAX_RSP_CH4_STA_CODE_TYP_ID,0)    08120099
081300                  ,COALESCE(W90.TAX_RSP_CH4_STA_CODE_ID,' ')      08130099
081400                  ,COALESCE(W90.LMT_ON_BEN_CD,' ')                08140099
081500                  ,COALESCE(W90.TAX_RSP_TAX_ID,0)                 08150099
081600            FOR READ ONLY                                         08160099
081700     END-EXEC.                                                    08170099
081800                                                                  08180099
081900     EXEC SQL                                                     08190099
082000       DECLARE W90_W92_ACCM_CURSOR                                08200099
082100        CURSOR WITH HOLD                                          08210099
082200       FOR                                                        08220099
082300       SELECT                                                     08230099
082400             W90.MFA_1042S_RPT_ITEM_ID                            08240099
082500            ,W90.LAST_MNT_OPID                                    08250099
082600            ,W90.LAST_MNT_DATE_TIME                               08260099
082700            ,W90.TAX_RSP_ST_CNY_CD                                08270099
082800            ,W90.INCOME_TYPE_CD                                   08280099
082900            ,COALESCE(W90.TAX_RSP_TAX_ID,0)                       08290099
083000            ,W90.CH3_TAX_RT                                       08300099
083100            ,W90.CH4_TAX_RT                                       08310099
083200            ,W90.CH3_WITHHOLDING_CD                               08320099
083300            ,W90.CH4_WITHHOLDING_CD                               08330099
076700            ,W90.CH3_EXEMPTION_CD                                 07670007
076800            ,W90.CH4_EXEMPTION_CD                                 07680007
076900            ,W90.TAX_RSP_CH3_STA_CODE_TYP_ID                      07690007
077000            ,W90.TAX_RSP_CH3_STA_CODE_ID                          07700007
077100            ,W90.TAX_RSP_CH4_STA_CODE_TYP_ID                      07710007
077200            ,W90.TAX_RSP_CH4_STA_CODE_ID                          07720007
077300            ,W90.LMT_ON_BEN_CD                                    07730007
084100            ,W90.UNIQUE_FORM_ID                                   08410099
084200            ,W92.FUND_CODE                                        08420099
084300            ,W92.ACCOUNT_NUMBER                                   08430099
084400            ,W92.TAX_YR_DT                                        08440099
084500            ,W92.ACCUMULATION_TYPE_CD                             08450099
084600            ,W92.MFA_1042S_RPT_ITEM_ID                            08460099
084700            ,W92.ADD_DT_TM                                        08470099
084800            ,W92.LAST_MNT_OPID                                    08480099
084900            ,W92.LAST_MNT_DATE_TIME                               08490099
085000            ,W92.GROSS_INCOME_AT                                  08500099
085100            ,W92.TAX_WITHHOLDING_AT                               08510099
078500            ,W92.TAX_RSP_GIIN_EXTERNAL_ID                         07850007
078600            ,W92.REPORTING_STATUS_CD                              07860007
085400            ,W92.REPORTING_STATUS_DT                              08540099
085500            ,W92.NQI_EIN_ID                                       08550099
078900            ,W92.NQI_GIIN_EXTERNAL_ID                             07890007
079000            ,W92.NQI_STATE_COUNTRY_CD                             07900007
085800            ,W92.NQI_FOREIGN_TAX_ID                               08580099
079200            ,W92.TAX_RSP_FOREIGN_TAX_ID                           07920007
086000            ,W92.TAX_RSP_BIRTH_DT                                 08600099
079400            ,W92.NQI_CH3_STA_CODE_TYPE_ID                         07940007
079500            ,W92.NQI_CH3_STA_CODE_ID                              07950007
079600            ,W92.NQI_CH4_STA_CODE_TYPE_ID                         07960007
079700            ,W92.NQI_CH4_STA_CODE_ID                              07970007
086500            ,W92.ADD_JOB_ID                                       08650099
086600            ,W92.PAYEE_LINE_1_NM                                  08660099
086700            ,W92.PAYEE_LINE_2_NM                                  08670099
086800            ,W92.PAYEE_ADDRESS_1_TX                               08680099
086900            ,W92.PAYEE_CITY_NM                                    08690099
087000            ,W92.PAYEE_STATE_CD                                   08700099
087100            ,W92.PAYEE_CAN_PVN_CD                                 08710099
087200            ,W92.PYE_ADR_US_IRS_CD                                08720099
087300            ,W92.PAYEE_POSTAL_CD                                  08730099
087400            ,W92.ACCOUNT_TYPE_CD                                  08740099
087500            ,W92.NQI_LINE_1_NM                                    08750099
087600            ,W92.NQI_LINE_2_NM                                    08760099
087700            ,W92.NQI_LINE_3_NM                                    08770099
087800            ,W92.NQI_ADR_LINE_1_TX                                08780099
087900            ,W92.NQI_ADR_LINE_2_TX                                08790099
088000            ,W92.NQI_CITY_NM                                      08800099
088100            ,W92.NQI_CAN_PVN_CD                                   08810099
088200            ,W92.NQI_US_IRS_CD                                    08820099
088300            ,W92.NQI_ZIP_CD                                       08830099
088400            ,W92.NQI_RPT_TAX_ID                                   08840099
088500            ,W92.PAYER_TAX_ID                                     08850099
088600            ,W92.PAYER_NM                                         08860099
088700            ,W92.RECIPIENT_TYPE_CD                                08870099
088800            ,W92.AMENDMENT_NBR                                    08880099
088900        FROM                                                      08890099
089000             W90_A999           AS W90                            08900099
089100        INNER JOIN                                                08910099
089200             W92_A999           AS W92                            08920099
089300           ON  W90.ACCOUNT_NUMBER                                 08930099
089400             = W92.ACCOUNT_NUMBER                                 08940099
089500           AND W90.ACCUMULATION_TYPE_CD                           08950099
089600             = W92.ACCUMULATION_TYPE_CD                           08960099
089700           AND W90.FUND_CODE                                      08970099
089800             = W92.FUND_CODE                                      08980099
089900           AND W90.MFA_1042S_RPT_ITEM_ID                          08990099
090000             = W92.MFA_1042S_RPT_ITEM_ID                          09000099
090100           AND W90.TAX_YR_DT                                      09010099
090200             = W92.TAX_YR_DT                                      09020099
090300       WHERE W90.FUND_CODE                                        09030099
090400             = :MFS-W90-A999.FUND-CODE                            09040099
090500         AND W90.ACCOUNT_NUMBER                                   09050099
090600             = :MFS-W90-A999.ACCOUNT-NUMBER                       09060099
090700         AND W90.TAX_YR_DT                                        09070099
090800             = :MFS-W90-A999.TAX-YR-DT                            09080099
090900         AND W90.ACCUMULATION_TYPE_CD                             09090099
091000             = :MFS-W90-A999.ACCUMULATION-TYPE-CD                 09100099
091100         AND W92.ADD_DT_TM                                        09110099
091200             = (SELECT                                            09120099
091300                       MAX(W92A.ADD_DT_TM)                        09130099
091400                  FROM                                            09140099
091500                       W92_A999 AS W92A                           09150099
091600                 WHERE                                            09160099
091700                       W92A.FUND_CODE                             09170099
091800                       = W92.FUND_CODE                            09180099
091900                   AND W92A.ACCOUNT_NUMBER                        09190099
092000                       = W92.ACCOUNT_NUMBER                       09200099
092100                   AND W92A.TAX_YR_DT                             09210099
092200                       = W92.TAX_YR_DT                            09220099
092300                   AND W92A.ACCUMULATION_TYPE_CD                  09230099
092400                       = W92.ACCUMULATION_TYPE_CD                 09240099
092500                   AND W92A.MFA_1042S_RPT_ITEM_ID                 09250099
092600                       = W92.MFA_1042S_RPT_ITEM_ID)               09260099
092700            ORDER BY                                              09270099
092800                   W90.TAX_YR_DT                                  09280099
092900                  ,W90.FUND_CODE                                  09290099
093000                  ,W90.ACCOUNT_NUMBER                             09300099
093100                  ,W90.ACCUMULATION_TYPE_CD                       09310099
093200                  ,W90.INCOME_TYPE_CD                             09320099
093300                  ,W90.TAX_RSP_ST_CNY_CD                          09330099
093400                  ,W90.CH3_TAX_RT                                 09340099
093500                  ,W90.CH4_TAX_RT                                 09350099
093600                  ,W90.CH3_WITHHOLDING_CD                         09360099
093700                  ,W90.CH4_WITHHOLDING_CD                         09370099
093800                  ,COALESCE(W90.CH3_EXEMPTION_CD,' ')             09380099
093900                  ,COALESCE(W90.CH4_EXEMPTION_CD,' ')             09390099
094000                  ,COALESCE(W90.TAX_RSP_CH3_STA_CODE_TYP_ID,0)    09400099
094100                  ,COALESCE(W90.TAX_RSP_CH3_STA_CODE_ID,' ')      09410099
094200                  ,COALESCE(W90.TAX_RSP_CH4_STA_CODE_TYP_ID,0)    09420099
094300                  ,COALESCE(W90.TAX_RSP_CH4_STA_CODE_ID,' ')      09430099
094400                  ,COALESCE(W90.LMT_ON_BEN_CD,' ')                09440099
094500                  ,COALESCE(W90.TAX_RSP_TAX_ID,0)                 09450099
094600            FOR READ ONLY                                         09460099
094700     END-EXEC.                                                    09470099
094800                                                                  09480099
094900                                                                  09490099
095000     EXEC SQL                                                     09500099
095100       DECLARE W90_UNIQUE_CURSOR                                  09510099
095200        CURSOR WITH HOLD                                          09520099
095300       FOR                                                        09530099
095400          SELECT                                                  09540099
095500                W90.UNIQUE_FORM_ID                                09550099
095600          FROM                                                    09560099
095700             W90_A999  AS W90                                     09570099
095800          INNER JOIN                                              09580099
095900             W92_A999  AS W92                                     09590099
096000           ON  W90.FUND_CODE                                      09600099
096100             = W92.FUND_CODE                                      09610099
096200           AND W90.ACCOUNT_NUMBER                                 09620099
096300             = W92.ACCOUNT_NUMBER                                 09630099
096400           AND W90.TAX_YR_DT                                      09640099
096500             = W92.TAX_YR_DT                                      09650099
096600           AND W90.ACCUMULATION_TYPE_CD                           09660099
096700             = W92.ACCUMULATION_TYPE_CD                           09670099
096800           AND W90.MFA_1042S_RPT_ITEM_ID                          09680099
096900             = W92.MFA_1042S_RPT_ITEM_ID                          09690099
096910        WHERE W90.FUND_CODE                                       09691099
096920              = :MFS-W90-A999.FUND-CODE                           09692099
096930          AND W90.ACCOUNT_NUMBER                                  09693099
096940              = :MFS-W90-A999.ACCOUNT-NUMBER                      09694099
096950          AND W90.TAX_YR_DT                                       09695099
096960              = :MFS-W90-A999.TAX-YR-DT                           09696099
096970          AND  W90.TAX_RSP_ST_CNY_CD                              09697099
096980               = :MFS-W90-A999.TAX-RSP-ST-CNY-CD                  09698099
096990          AND  W90.INCOME_TYPE_CD                                 09699099
096991               = :MFS-W90-A999.INCOME-TYPE-CD                     09699199
096992          AND  W90.TAX_RSP_TAX_ID                                 09699299
096993               IS NOT DISTINCT FROM                               09699399
096994                 :MFS-W90-A999.TAX-RSP-TAX-ID                     09699499
096995                  INDICATOR                                       09699599
096996                 :MFS-W90-A999.TAX-RSP-TAX-ID-NC                  09699699
096997          AND  W90.CH3_TAX_RT                                     09699799
096998               = :MFS-W90-A999.CH3-TAX-RT                         09699899
096999          AND  W90.CH4_TAX_RT                                     09699999
097000               = :MFS-W90-A999.CH4-TAX-RT                         09700099
097001          AND  W90.CH3_WITHHOLDING_CD                             09700199
097002               = :MFS-W90-A999.CH3-WITHHOLDING-CD                 09700299
097003          AND  W90.CH4_WITHHOLDING_CD                             09700399
097004               = :MFS-W90-A999.CH4-WITHHOLDING-CD                 09700499
097005          AND  W90.CH3_EXEMPTION_CD                               09700599
097006               IS NOT DISTINCT FROM                               09700699
097007                 :MFS-W90-A999.CH3-EXEMPTION-CD                   09700799
097008                  INDICATOR                                       09700899
097009                 :MFS-W90-A999.CH3-EXEMPTION-CD-NC                09700999
097010          AND  W90.CH4_EXEMPTION_CD                               09701099
097011               IS NOT DISTINCT FROM                               09701199
097012                 :MFS-W90-A999.CH4-EXEMPTION-CD                   09701299
097013                  INDICATOR                                       09701399
097014                 :MFS-W90-A999.CH4-EXEMPTION-CD-NC                09701499
097015          AND  W90.TAX_RSP_CH3_STA_CODE_TYP_ID                    09701599
097016               IS NOT DISTINCT FROM                               09701699
097017                 :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-TYP-ID        09701799
097018                  INDICATOR                                       09701899
097019                 :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-TYP-ID-NC     09701999
097020          AND  W90.TAX_RSP_CH3_STA_CODE_ID                        09702099
097021               IS NOT DISTINCT FROM                               09702199
097022                 :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-ID            09702299
097023                  INDICATOR                                       09702399
097024                 :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-ID-NC         09702499
097025          AND  W90.TAX_RSP_CH4_STA_CODE_TYP_ID                    09702599
097026               IS NOT DISTINCT FROM                               09702699
097027                 :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-TYP-ID        09702799
097028                  INDICATOR                                       09702899
097029                 :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-TYP-ID-NC     09702999
097030          AND  W90.TAX_RSP_CH4_STA_CODE_ID                        09703099
097031               IS NOT DISTINCT FROM                               09703199
097032                 :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-ID            09703299
097033                  INDICATOR                                       09703399
097034                 :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-ID-NC         09703499
097035          AND  W90.LMT_ON_BEN_CD                                  09703599
097036               IS NOT DISTINCT FROM                               09703699
097037                 :MFS-W90-A999.LMT-ON-BEN-CD                      09703799
097038                  INDICATOR                                       09703899
097039                 :MFS-W90-A999.LMT-ON-BEN-CD-NC                   09703999
096100          FOR READ ONLY                                           09610007
100400     END-EXEC.                                                    10040099
100500                                                                  10050099
100600 01  FILLER                          PIC X(32)  VALUE             10060099
100700     'WS FOR PGM B27935 ENDS HERE'.                               10070099
100800                                                                  10080099
100900******************************************************************10090099
101000 PROCEDURE DIVISION.                                              10100099
101100******************************************************************10110099
101200     ENTRY 'DB2NTRY'.                                             10120099
101300                                                                  10130099
101400     PERFORM 1000-QUICKSTART-INIT.                                10140099
101500     PERFORM 1100-INITIAL-PROCESS.                                10150099
101600                                                                  10160099
101700     PERFORM 2000-MAIN-PROCESS                                    10170099
101800       UNTIL WS-WE342Y1-EOF-YES.                                  10180099
101900                                                                  10190099
102000     PERFORM 9400-CLOSE-FILES.                                    10200099
102100     PERFORM 9800-END-OF-PROCESS.                                 10210099
102200                                                                  10220099
102300     MOVE 'E'                                                     10230099
102400       TO CKPT-REQUEST-TYPE OF CKPT-SAVE-AREA.                    10240099
102500                                                                  10250099
102600     PERFORM 9999-CHECKPOINT-ROUTINE.                             10260099
102700                                                                  10270099
102800     MOVE ZERO TO RETURN-CODE.                                    10280099
102900     GOBACK.                                                      10290099
103000                                                                  10300099
103100                                                                  10310099
103200 1000-QUICKSTART-INIT.                                            10320099
103300                                                                  10330099
103400     MOVE WS-B27935                                               10340099
103500       TO CKPT-PGM-NAME OF CKPT-SAVE-AREA.                        10350099
103600     MOVE 'T005'                                                  10360099
103700       TO CKPT-FREQUENCY OF CKPT-SAVE-AREA.                       10370099
103800                                                                  10380099
103900     MOVE 'S'   TO CKPT-REQUEST-TYPE OF CKPT-SAVE-AREA.           10390099
104000     PERFORM 9999-CHECKPOINT-ROUTINE.                             10400099
104100     MOVE SPACE TO CKPT-REQUEST-TYPE OF CKPT-SAVE-AREA.           10410099
104200     COPY ZC0060.                                                 10420099
104300                                                                  10430099
104400                                                                  10440099
104500 1100-INITIAL-PROCESS.                                            10450099
104600                                                                  10460099
104700     INITIALIZE MFS-W90-A999                                      10470099
104800                MFS-W92-A999.                                     10480099
104900                                                                  10490099
105000     SET SR0009-PTR TO ENTRY SR0009.                              10500099
105100     SET SR0622-PTR TO ENTRY SR0622.                              10510099
105200     SET SR1184-PTR TO ENTRY SR1184.                              10520099
105300                                                                  10530099
105400     PERFORM 1200-OPEN-FILES.                                     10540099
105500                                                                  10550099
105600     IF PROGRAM-IS-RESTARTING                                     10560099
105700        PERFORM 9100-READ-WE342Y1-FILE                            10570099
105800        IF WS-WE341Y1-KEY-CHANGE-NO                               10580099
105900           PERFORM 9000-READ-WE341Y1-FILE                         10590099
106000        ELSE                                                      10600099
106100           PERFORM 9050-REREAD-WE341Y1-FILE                       10610099
106200        END-IF                                                    10620099
106300        DISPLAY ' '                                               10630099
106400        DISPLAY '*********************************'               10640099
106500        DISPLAY '**  B27935 IS RESTARTING MODE  **'               10650099
106600        DISPLAY '**  START AT FUND CODE AS '                      10660099
106700                FUND-CODE            OF 100-1042S-RPT-INFO-REC    10670099
106800        DISPLAY '**  ACCOUNT NUMBER AS '                          10680099
106900                ACCOUNT-NUMBER       OF 100-1042S-RPT-INFO-REC    10690099
107000        DISPLAY '**  TAX YEAR AS AS '                             10700099
107100                TAX-YR-DT            OF 100-1042S-RPT-INFO-REC    10710099
107200        DISPLAY '**  AND ACCUMULATION TYPS AS '                   10720099
107300                ACCUMULATION-TYPE-CD OF 100-1042S-RPT-INFO-REC    10730099
107400        DISPLAY '*********************************'               10740099
107500        DISPLAY ' '                                               10750099
107600     ELSE                                                         10760099
107700        PERFORM 1300-INITIAL-WS                                   10770099
107800        PERFORM 1400-CALL-SR0011                                  10780099
107900        PERFORM 9000-READ-WE341Y1-FILE                            10790099
108000        PERFORM 9100-READ-WE342Y1-FILE                            10800099
108100        PERFORM 1500-CHECK-EMPTY-FILE                             10810099
108200     END-IF.                                                      10820099
108300                                                                  10830099
108400                                                                  10840099
108500 1200-OPEN-FILES.                                                 10850099
108600                                                                  10860099
108700     COPY QSOPENI REPLACING MYFD BY 100-1042S-RPT-INFO-FILE.      10870099
108800     COPY QSOPENI REPLACING MYFD BY 110-ACCT-DRIVER-FILE.         10880099
108900                                                                  10890099
109000     IF FILE-OK OF 100-1042S-RPT-INFO-FILE-STATUS                 10900099
109100        CONTINUE                                                  10910099
109200     ELSE                                                         10920099
109300        DISPLAY '********** B27935  ABENDING **********'          10930099
109400           UPON CONSOLE                                           10940099
109500        DISPLAY '* PARAGRAPH  : 1200-OPEN-FILES       *'          10950099
109600           UPON CONSOLE                                           10960099
109700        DISPLAY '* UNSUCCESSFUL OPEN WE341Y1 FILE     *'          10970099
109800           UPON CONSOLE                                           10980099
109900        DISPLAY '* RETURN CODE: '                                 10990099
110000                FILE-STATUS OF 100-1042S-RPT-INFO-FILE-STATUS     11000099
110100           UPON CONSOLE                                           11010099
110200        DISPLAY '**************************************'          11020099
110300           UPON CONSOLE                                           11030099
110400        CALL SR0002                                               11040099
110500     END-IF.                                                      11050099
110600                                                                  11060099
110700     IF FILE-OK OF 110-ACCT-DRIVER-FILE-STATUS                    11070099
110800        CONTINUE                                                  11080099
110900     ELSE                                                         11090099
111000        DISPLAY '********** B27935  ABENDING **********'          11100099
111100           UPON CONSOLE                                           11110099
111200        DISPLAY '* PARAGRAPH  : 1200-OPEN-FILES       *'          11120099
111300           UPON CONSOLE                                           11130099
111400        DISPLAY '* UNSUCCESSFUL OPEN WE342Y1 FILE     *'          11140099
111500           UPON CONSOLE                                           11150099
111600        DISPLAY '* RETURN CODE: '                                 11160099
111700                FILE-STATUS OF 110-ACCT-DRIVER-FILE-STATUS        11170099
111800           UPON CONSOLE                                           11180099
111900        DISPLAY '**************************************'          11190099
112000           UPON CONSOLE                                           11200099
112100        CALL SR0002                                               11210099
112200     END-IF.                                                      11220099
112300                                                                  11230099
112400                                                                  11240099
112500 1300-INITIAL-WS.                                                 11250099
112600                                                                  11260099
112700     MOVE +0 TO  WS-WE341Y1-CNT                                   11270099
112800                 WS-WE342Y1-CNT                                   11280099
112900                 WS-W90-ADD-CNT                                   11290099
113000                 WS-W92-ADD-CNT                                   11300099
113100                 WS-W92-UPD-CNT                                   11310099
113200                 WS-W90-DEL-CNT                                   11320099
113300                 WS-W92-DEL-CNT.                                  11330099
113400                                                                  11340099
113500      SET WS-WE341Y1-EOF-NO                                       11350099
113600          WS-WE342Y1-EOF-NO                                       11360099
113700          WS-W90-EOC-NO                                           11370099
113800          WS-W92-EOC-NO                                           11380099
113900          WS-W90-W92-EOC-NO                                       11390099
114000       TO TRUE.                                                   11400099
114100                                                                  11410099
114200                                                                  11420099
114300 1400-CALL-SR0011.                                                11430099
114400                                                                  11440099
114500     CALL SR0011 USING PSR0011.                                   11450099
114600     MOVE JOB-NAME  OF PSR0011 TO WS-JOB-NAME.                    11460099
114700     MOVE JOB-ID    OF PSR0011 TO WS-JOB-ID.                      11470099
114800                                                                  11480099
114900                                                                  11490099
115000 1500-CHECK-EMPTY-FILE.                                           11500099
115100                                                                  11510099
115200     IF WS-WE341Y1-EOF-YES                                        11520099
115300        DISPLAY '************** B27935 WARNING ***************'   11530099
115400        DISPLAY '*           FILE WE341Y1 IS EMPTY           *'   11540099
115500        DISPLAY '************** B27935 WARNING ***************'   11550099
115600     END-IF.                                                      11560099
115700                                                                  11570099
115800     IF WS-WE342Y1-EOF-YES                                        11580099
115900        DISPLAY '************** B27935 WARNING ***************'   11590099
116000        DISPLAY '*           FILE WE342Y1 IS EMPTY           *'   11600099
116100        DISPLAY '************** B27935 WARNING ***************'   11610099
116200     END-IF.                                                      11620099
116300                                                                  11630099
116400 2000-MAIN-PROCESS.                                               11640099
116500                                                                  11650099
116600     EVALUATE TRUE                                                11660099
116700        WHEN WS-WE341Y1-KEY1-FIELDS > WS-WE342Y1-KEY1-FIELDS      11670099
116800        WHEN WS-WE341Y1-EOF-YES                                   11680099
116900             PERFORM 2100-CANCEL-PROCESS                          11690099
117000        WHEN WS-WE341Y1-KEY1-FIELDS = WS-WE342Y1-KEY1-FIELDS      11700099
117100             PERFORM 2200-UPDATE-STATUS-PROCESS                   11710099
117200        WHEN OTHER                                                11720099
117300             DISPLAY '************ B27935  ABENDING ************' 11730099
117400                UPON CONSOLE                                      11740099
117500             DISPLAY '* PARAGRAPH  : 2000-MAIN-PROCESS         *' 11750099
117600                UPON CONSOLE                                      11760099
117700             DISPLAY '* FUND/ACCOUNT WAS NOT FOUND ON WE342Y1  *' 11770099
117800                UPON CONSOLE                                      11780099
117900             DISPLAY '* TAX YEAR    : 'WS-WE341Y1-TAX-YR-DT       11790099
118000                UPON CONSOLE                                      11800099
118100             DISPLAY '* FUND CODE   : 'WS-WE341Y1-FUND-CODE       11810099
118200                UPON CONSOLE                                      11820099
118300             DISPLAY '* ACCT NUMBER : 'WS-WE341Y1-ACCT-NO         11830099
118400                UPON CONSOLE                                      11840099
118500             DISPLAY '******************************************' 11850099
118600                UPON CONSOLE                                      11860099
118700             CALL SR0002                                          11870099
118800     END-EVALUATE.                                                11880099
118900                                                                  11890099
119000                                                                  11900099
119100 2100-CANCEL-PROCESS.                                             11910099
119200                                                                  11920099
119300     SET WS-W90-W92-EOC-NO TO TRUE.                               11930099
119400     PERFORM 7000-OPEN-W90-W92-CURSOR.                            11940099
119500     PERFORM 7050-FETCH-W90-W92-CURSOR.                           11950099
119600     PERFORM 5000-CANCEL-TRAN-PROCESS                             11960099
119700       UNTIL WS-W90-W92-EOC-YES.                                  11970099
119800     PERFORM 7100-CLOSE-W90-W92-CURSOR.                           11980099
119900     IF WS-WE341Y1-KEY1-FIELDS > WS-WE342Y1-KEY1-FIELDS           11990099
120000     OR WS-WE341Y1-EOF-YES                                        12000099
120100        CONTINUE                                                  12010099
120200     ELSE                                                         12020099
120300        PERFORM 9000-READ-WE341Y1-FILE                            12030099
120400     END-IF.                                                      12040099
120500     PERFORM 9999-CHECKPOINT-ROUTINE.                             12050099
120600     PERFORM 9100-READ-WE342Y1-FILE.                              12060099
120700                                                                  12070099
120800                                                                  12080099
120900 2200-UPDATE-STATUS-PROCESS.                                      12090099
121000                                                                  12100099
121100     MOVE TAX-YR-DT                 OF 100-1042S-RPT-INFO-REC     12110099
121200       TO WS-CURR-WE341Y1-TAX-YR-DT.                              12120099
121300     MOVE FUND-CODE                 OF 100-1042S-RPT-INFO-REC     12130099
121400       TO WS-CURR-WE341Y1-FUND-CODE.                              12140099
121500     MOVE ACCOUNT-NUMBER            OF 100-1042S-RPT-INFO-REC     12150099
121600       TO WS-CURR-WE341Y1-ACCT-NO.                                12160099
121700                                                                  12170099
121800     SET WS-WE341Y1-KEY-CHANGE-NO                                 12180099
121900         WS-W90-W92-ACCM-EOC-NO                                   12190099
122000         WS-W90-W92-EOC-NO                                        12200099
122100         ACCUMULATION-TYPE-CUSTOMER OF MFS-W90-A999 TO TRUE.      12210099
122200                                                                  12220099
122300     PERFORM 7600-SELECT-STATUS-EXIST.                            12230099
122400     IF WS-STATUS-FOUND-YES                                       12240099
122500        IF REPORTING-STATUS-NOT-CREATED OF MFS-W92-A999           12250099
122600           SET  WS-STATUS-0-CMR-YES  TO TRUE                      12260099
123100        ELSE                                                      12310099
123200           SET  WS-STATUS-0-CMR-NO   TO TRUE                      12320099
123300        END-IF                                                    12330099
123400     ELSE                                                         12340099
123500        SET  WS-STATUS-0-CMR-YES     TO TRUE                      12350099
123600     END-IF.                                                      12360099
123700                                                                  12370099
123800     SET ACCUMULATION-TYPE-IRS       OF MFS-W90-A999 TO TRUE.     12380099
123900     PERFORM 7600-SELECT-STATUS-EXIST.                            12390099
124000     IF WS-STATUS-FOUND-YES                                       12400099
124100        IF REPORTING-STATUS-NOT-CREATED OF MFS-W92-A999           12410099
124200           SET  WS-STATUS-0-IRS-YES  TO TRUE                      12420099
124300        ELSE                                                      12430099
124400           SET  WS-STATUS-0-IRS-NO   TO TRUE                      12440099
124500        END-IF                                                    12450099
124600     ELSE                                                         12460099
124700        SET  WS-STATUS-0-IRS-YES     TO TRUE                      12470099
124800     END-IF.                                                      12480099
124900                                                                  12490099
125000     PERFORM 7000-OPEN-W90-W92-CURSOR.                            12500099
125100     PERFORM 7050-FETCH-W90-W92-CURSOR.                           12510099
125200     IF WS-W90-W92-EOC-YES                                        12520099
125300        SET WS-SSN-CHANGE-NO         TO TRUE                      12530099
125400     ELSE                                                         12540099
125500        PERFORM 3500-GET-CURRENT-SSN                              12550099
125600     END-IF.                                                      12560099
125700                                                                  12570099
125800     IF WS-SSN-CHANGE-YES                                         12580099
125900        PERFORM 3000-SSN-CHANGE-PROCESS                           12590099
126000          UNTIL WS-W90-W92-ACCM-EOC-YES                           12600099
126100            AND WS-WE341Y1-KEY-CHANGE-YES                         12610099
126200        PERFORM 7100-CLOSE-W90-W92-CURSOR                         12620099
126300        PERFORM 9999-CHECKPOINT-ROUTINE                           12630099
126400        PERFORM 9100-READ-WE342Y1-FILE                            12640099
126500     ELSE                                                         12650099
126600        PERFORM 4000-CORRECTED-PROCESS                            12660099
126700          UNTIL WS-W90-W92-EOC-YES                                12670099
126800            AND WS-WE341Y1-KEY-CHANGE-YES                         12680099
126900        PERFORM 7100-CLOSE-W90-W92-CURSOR                         12690099
127000        PERFORM 9999-CHECKPOINT-ROUTINE                           12700099
127100        PERFORM 9100-READ-WE342Y1-FILE                            12710099
127200     END-IF.                                                      12720099
127300                                                                  12730099
143900 3000-SSN-CHANGE-PROCESS.                                         14390099
144000                                                                  14400099
144100     SET WS-W90-W92-ACCM-EOC-NO        TO TRUE.                   14410099
144200     MOVE ACCUMULATION-TYPE-CD         OF 100-1042S-RPT-INFO-REC  14420099
144300       TO WS-CURR-WE341Y1-ACCUM-TYPE.                             14430099
144400     PERFORM 8100-OPEN-W90-W92-ACCM-CURSOR.                       14440099
144500     PERFORM 8120-FETCH-W90-W92-ACCM-CURSOR.                      14450099
144600     IF ACCUMULATION-TYPE-DEALER       OF WS-CURR-W92-REC OR      14460099
144700        ACCUMULATION-TYPE-NON-DEALER   OF WS-CURR-W92-REC OR      14470099
144800        REPORTING-STATUS-NOT-CREATED   OF WS-CURR-W92-REC         14480099
144900        SET WS-SSN-CHANGE-ONE-STEP     TO TRUE                    14490099
145000     ELSE                                                         14500099
145100        IF WS-WE341Y1-ACCM-CHANGE-YES                             14510099
145200           PERFORM 3500-GET-CURRENT-SSN                           14520099
145300        END-IF                                                    14530099
145400     END-IF.                                                      14540099
145500     SET WS-WE341Y1-ACCM-CHANGE-NO     TO TRUE.                   14550099
145600                                                                  14560099
145700     EVALUATE TRUE                                                14570099
145800       WHEN WS-SSN-CHANGE-ONE-STEP                                14580099
145900       WHEN WS-SSN-CHANGE-TWO-STEP-RPT AND                        14590099
146000            WS-INPUT-MATCH-OLD-SSN-NO                             14600099
146100            PERFORM 3100-OLD-SSN-ONE-STEP-PROCESS                 14610099
146200              UNTIL WS-W90-W92-ACCM-EOC-YES                       14620099
146300            PERFORM 3200-NEW-SSN-ONE-STEP-PROCESS                 14630099
146400              UNTIL WS-WE341Y1-ACCM-CHANGE-YES                    14640099
146500                 OR WS-WE341Y1-KEY-CHANGE-YES                     14650099
128710            PERFORM 3600-INPUT-LESS-W90-PROCESS                   12871001
146600       WHEN WS-SSN-CHANGE-TWO-STEP     AND                        14660099
146700            WS-INPUT-MATCH-OLD-SSN-YES                            14670099
146800            PERFORM UNTIL WS-W90-W92-ACCM-EOC-YES                 14680099
146900              IF REPORTING-STATUS-CORR-REQUIRED OF WS-CURR-W92-REC14690099
147000              OR REPORTING-STATUS-ZERO-REQUIRED OF WS-CURR-W92-REC14700099
147100                 PERFORM 6700-DELETE-W92-PROCESS                  14710099
147200                 PERFORM 6800-DELETE-W90-PROCESS                  14720099
147300              END-IF                                              14730099
147400              PERFORM 8120-FETCH-W90-W92-ACCM-CURSOR              14740099
147500            END-PERFORM                                           14750099
147600            PERFORM 8240-CLOSE-W90-W92-ACCM-CURSOR                14760099
147700            PERFORM 8100-OPEN-W90-W92-ACCM-CURSOR                 14770099
147800            PERFORM 8120-FETCH-W90-W92-ACCM-CURSOR                14780099
147900            PERFORM 4000-CORRECTED-PROCESS                        14790099
148000              UNTIL WS-W90-W92-ACCM-EOC-YES                       14800099
148100               AND  (WS-WE341Y1-ACCM-CHANGE-YES OR                14810099
148200                    WS-WE341Y1-KEY-CHANGE-YES)                    14820099
148300       WHEN WS-SSN-CHANGE-TWO-STEP     AND                        14830099
148400            WS-INPUT-MATCH-OLD-SSN-NO                             14840099
148500            PERFORM UNTIL WS-W90-W92-ACCM-EOC-YES                 14850099
148600              IF REPORTING-STATUS-CORR-REQUIRED OF WS-CURR-W92-REC14860099
148700              OR REPORTING-STATUS-NOT-CREATED   OF WS-CURR-W92-REC14870099
148800                 PERFORM 6700-DELETE-W92-PROCESS                  14880099
148900                 PERFORM 6800-DELETE-W90-PROCESS                  14890099
149000              END-IF                                              14900099
149100              PERFORM 8120-FETCH-W90-W92-ACCM-CURSOR              14910099
149200            END-PERFORM                                           14920099
149300            PERFORM UNTIL WS-WE341Y1-ACCM-CHANGE-YES              14930099
149400                       OR WS-WE341Y1-KEY-CHANGE-YES               14940099
149500              PERFORM 4300-COMPARE-WE341Y1-W92                    14950099
149600              PERFORM 3050-CHECK-STATUS-3-2-W92                   14960099
149700              IF WS-PARTIAL-REALLOCATE-YES                        14970099
149800                 SET WS-STATUS-0 TO TRUE                          14980099
149900              ELSE                                                14990099
150000                 SET WS-STATUS-2 TO TRUE                          15000099
150100              END-IF                                              15010099
129100              PERFORM 5700-CHECK-EXIST-KEY                        12910007
150300              PERFORM 9000-READ-WE341Y1-FILE                      15030099
150400              PERFORM 6300-CHECK-CURR-WE341Y1-FILE                15040099
150500            END-PERFORM                                           15050099
150600       WHEN WS-SSN-CHANGE-TWO-STEP-RPT AND                        15060099
150700            WS-INPUT-MATCH-OLD-SSN-YES                            15070099
150800            MOVE WS-SAVE-W90-KEY                                  15080099
150900              TO WS-SAVE-CURRENT-W90-KEY                          15090099
151000            PERFORM 3300-TWO-STEP-RPT-PROCESS                     15100099
151100              UNTIL WS-W90-W92-ACCM-EOC-YES                       15110099
151200               AND  (WS-WE341Y1-ACCM-CHANGE-YES OR                15120099
151300                    WS-WE341Y1-KEY-CHANGE-YES)                    15130099
151400     END-EVALUATE.                                                15140099
151500                                                                  15150099
151600     PERFORM 8240-CLOSE-W90-W92-ACCM-CURSOR.                      15160099
151700                                                                  15170099
151800 3050-CHECK-STATUS-3-2-W92.                                       15180099
151900                                                                  15190099
152000     SET  REPORTING-STATUS-CORR-REQUIRED OF MFS-W92-A999          15200099
152100                                         TO TRUE.                 15210099
152200     PERFORM 8400-SELECT-TWO-STEP-SSN.                            15220099
152300     IF  WS-SSN-FOUND-YES                                         15230099
152400         SET WS-STATUS-2-EXIST-YES       TO TRUE                  15240099
152500         MOVE TAX-RSP-TAX-ID             OF MFS-W90-A999          15250099
152600           TO WS-NEW-SSN-STA-2                                    15260099
152700     ELSE                                                         15270099
152800         SET WS-STATUS-2-EXIST-NO        TO TRUE                  15280099
152900     END-IF.                                                      15290099
153000                                                                  15300099
153100     SET REPORTING-STATUS-ZERO-REQUIRED  OF MFS-W92-A999          15310099
153200                                         TO TRUE.                 15320099
153300     PERFORM 8400-SELECT-TWO-STEP-SSN.                            15330099
153400     IF  WS-SSN-FOUND-YES                                         15340099
153500         SET WS-STATUS-3-EXIST-YES       TO TRUE                  15350099
153600         MOVE TAX-RSP-TAX-ID             OF MFS-W90-A999          15360099
153700           TO WS-OLD-SSN-STA-3                                    15370099
153800     ELSE                                                         15380099
153900         SET WS-STATUS-3-EXIST-NO        TO TRUE                  15390099
154000     END-IF.                                                      15400099
154100                                                                  15410099
154200     IF WS-STATUS-2-EXIST-YES AND WS-STATUS-3-EXIST-YES           15420099
154300     AND (WS-SSN-CHANGE-YES OR WS-CORRECTED-ACTION)               15430099
154400        SET WS-PARTIAL-REALLOCATE-YES    TO TRUE                  15440099
154500     ELSE                                                         15450099
154600        SET WS-PARTIAL-REALLOCATE-NO     TO TRUE                  15460099
154700     END-IF.                                                      15470099
154800                                                                  15480099
154900 3100-OLD-SSN-ONE-STEP-PROCESS.                                   15490099
155000                                                                  15500099
155100     EVALUATE TRUE                                                15510099
155200        WHEN REPORTING-STATUS-NOT-CREATED      OF WS-CURR-W92-REC 15520099
155300             PERFORM 6700-DELETE-W92-PROCESS                      15530099
155400             PERFORM 6800-DELETE-W90-PROCESS                      15540099
155500        WHEN REPORTING-STATUS-PRODUCED         OF WS-CURR-W92-REC 15550099
155600        WHEN REPORTING-STATUS-CORR-PRODUCED    OF WS-CURR-W92-REC 15560099
155700             PERFORM 6900-INSERT-W92-STATUS-3                     15570099
155800        WHEN REPORTING-STATUS-CORR-REQUIRED    OF WS-CURR-W92-REC 15580099
155900             PERFORM 7900-SELECT-PREV-STATUS                      15590099
156000             IF REPORTING-STATUS-PRODUCED      OF MFS-W92-A999 OR 15600099
156100                REPORTING-STATUS-CORR-PRODUCED OF MFS-W92-A999    15610099
156200                PERFORM 6950-UPDATE-W92-STATUS-3                  15620099
156300             ELSE                                                 15630099
156400                PERFORM 6700-DELETE-W92-PROCESS                   15640099
156500                PERFORM 6800-DELETE-W90-PROCESS                   15650099
156600             END-IF                                               15660099
156700        WHEN REPORTING-STATUS-ZERO-CORR-PRD    OF WS-CURR-W92-REC 15670099
156800             AND REPORTING-STATUS-DT-NY        OF MFS-W92-A999    15680099
156900             AND TAX-RSP-TAX-ID                OF WS-CURR-W90-REC 15690099
157000                 = WS-NEW-SSN                                     15700099
157100                 PERFORM 6950-UPDATE-W92-STATUS-3                 15710099
157200     END-EVALUATE.                                                15720099
157300                                                                  15730099
157400     PERFORM 8120-FETCH-W90-W92-ACCM-CURSOR.                      15740099
157500                                                                  15750099
157600 3200-NEW-SSN-ONE-STEP-PROCESS.                                   15760099
157700                                                                  15770099
137900      IF ACCUMULATION-TYPE-CUSTOMER OF 100-1042S-RPT-INFO-REC     13790001
138000         IF WS-STATUS-0-CMR-YES                                   13800001
138100            SET WS-STATUS-0         TO TRUE                       13810001
138200         ELSE                                                     13820001
138300            PERFORM 3250-SETUP-NEW-STATUS                         13830001
138400         END-IF                                                   13840001
138500      ELSE                                                        13850001
138600         IF ACCUMULATION-TYPE-IRS   OF 100-1042S-RPT-INFO-REC     13860001
138700            IF WS-STATUS-0-IRS-YES                                13870001
138800               SET WS-STATUS-0      TO TRUE                       13880001
138900            ELSE                                                  13890001
139000               PERFORM 3250-SETUP-NEW-STATUS                      13900001
139100            END-IF                                                13910001
139200         ELSE                                                     13920001
139300            SET WS-STATUS-0         TO TRUE                       13930001
139400         END-IF                                                   13940001
139500      END-IF.                                                     13950001
139600                                                                  13960001
139700      PERFORM 5700-CHECK-EXIST-KEY.                               13970001
139800      PERFORM 9000-READ-WE341Y1-FILE.                             13980001
139900      PERFORM 6300-CHECK-CURR-WE341Y1-FILE.                       13990001
140000                                                                  14000001
140100                                                                  14010001
140200 3250-SETUP-NEW-STATUS.                                           14020001
140400                                                                  14040001
140215      IF WS-SAVE-WE341Y1-W90-KEY < WS-SAVE-CURRENT-W90-KEY        14021501
140216         SET WS-STATUS-0                                          14021601
140217             WS-INPUT-LESS-THAN-W90-YES TO TRUE                   14021701
140218         MOVE WS-SAVE-WE341Y1-W90-KEY                             14021801
140219           TO WS-SAVE2-WE341Y1-W90-KEY2                           14021901
140220         MOVE TAX-RSP-TAX-ID            OF 100-1042S-RPT-INFO-REC 14022001
140221           TO WS-TAX-RSP-TAX-ID                                   14022101
140222      ELSE                                                        14022201
140223         IF WS-SAVE-WE341Y1-W90-KEY = WS-SAVE-CURRENT-W90-KEY     14022301
140224            SET REPORTING-STATUS-ZERO-REQUIRED                    14022401
140225                                        OF MFS-W92-A999           14022501
140226                WS-PARTIAL-ALLOCATE-YES TO TRUE                   14022601
140227            PERFORM 8400-SELECT-TWO-STEP-SSN                      14022701
140228            IF WS-SSN-FOUND-YES                                   14022801
140229               SET WS-STATUS-2         TO TRUE                    14022901
140230            ELSE                                                  14023001
140231               SET WS-STATUS-0         TO TRUE                    14023101
140232            END-IF                                                14023201
140233         ELSE                                                     14023301
140600            PERFORM 6520-MOVE-WRKE341-TO-W90                      14060000
140234            SET REPORTING-STATUS-CORR-REQUIRED                    14023401
140235                                        OF MFS-W92-A999           14023501
140236                                        TO TRUE                   14023601
140237            PERFORM 8400-SELECT-TWO-STEP-SSN                      14023701
140238            IF WS-SSN-FOUND-YES                                   14023801
141200               SET WS-STATUS-2-SSN-FOUND-YES TO TRUE              14120000
140239               PERFORM 6870-MOVE-W90-TO-SAVE-STATUS2              14023901
141400            ELSE                                                  14140000
141500               SET WS-STATUS-2-SSN-FOUND-NO  TO TRUE              14150000
140240            END-IF                                                14024001
140241            SET REPORTING-STATUS-ZERO-REQUIRED                    14024101
140242                                        OF MFS-W92-A999           14024201
140243                                        TO TRUE                   14024301
140244            PERFORM 8400-SELECT-TWO-STEP-SSN                      14024401
140245            IF WS-SSN-FOUND-YES                                   14024501
142200               SET WS-STATUS-3-SSN-FOUND-YES TO TRUE              14220000
140246               PERFORM 6860-MOVE-W90-TO-SAVE-STATUS3              14024601
142400            ELSE                                                  14240000
142500               SET WS-STATUS-3-SSN-FOUND-NO  TO TRUE              14250000
140247            END-IF                                                14024701
142700            IF WS-STATUS-2-SSN-FOUND-YES      OR                  14270000
142800               WS-STATUS-3-SSN-FOUND-YES                          14280000
142900               IF WS-SAVE-W90-STATUS-2 = WS-SAVE-W90-STATUS-3     14290000
143000                  SET WS-STATUS-0       TO TRUE                   14300000
143100               ELSE                                               14310000
143200                  SET WS-STATUS-2       TO TRUE                   14320000
143300               END-IF                                             14330000
140250            ELSE                                                  14025001
143500               SET WS-STATUS-0          TO TRUE                   14350000
140252            END-IF                                                14025201
140253         END-IF                                                   14025301
140254      END-IF.                                                     14025401
159400                                                                  15940099
159500                                                                  15950099
159600 3300-TWO-STEP-RPT-PROCESS.                                       15960099
159700                                                                  15970099
159800     EVALUATE TRUE                                                15980099
159900        WHEN WS-SAVE-WE341Y1-W90-KEY = WS-SAVE-W90-KEY            15990099
160000             PERFORM 3400-UPDT-TWO-STEP-RPT-STAT                  16000099
160100             PERFORM 8120-FETCH-W90-W92-ACCM-CURSOR               16010099
160200             IF WS-SAVE-W90-KEY = WS-SAVE-CURRENT-W90-KEY OR      16020099
160300                WS-INSERT-NEW-SSN-NO                              16030099
160400                CONTINUE                                          16040099
160500             ELSE                                                 16050099
160600                SET WS-INSERT-NEW-SSN-NO TO TRUE                  16060099
160700                MOVE WS-SAVE-W90-KEY                              16070099
160800                  TO WS-SAVE-CURRENT-W90-KEY                      16080099
160900                PERFORM 9000-READ-WE341Y1-FILE                    16090099
161000                PERFORM 6300-CHECK-CURR-WE341Y1-FILE              16100099
161100             END-IF                                               16110099
161200        WHEN WS-SAVE-WE341Y1-W90-KEY > WS-SAVE-W90-KEY            16120099
161300             PERFORM 6900-INSERT-W92-STATUS-3                     16130099
161400             PERFORM 8120-FETCH-W90-W92-ACCM-CURSOR               16140099
161500        WHEN WS-SAVE-WE341Y1-W90-KEY < WS-SAVE-W90-KEY            16150099
161600             SET WS-STATUS-2 TO TRUE                              16160099
161700             PERFORM 6400-INSERT-W90-W92                          16170099
161800             PERFORM 9000-READ-WE341Y1-FILE                       16180099
161900             PERFORM 6300-CHECK-CURR-WE341Y1-FILE                 16190099
162000     END-EVALUATE.                                                16200099
162100                                                                  16210099
162200                                                                  16220099
162300 3400-UPDT-TWO-STEP-RPT-STAT.                                     16230099
162400                                                                  16240099
162500     IF REPORTING-STATUS-ZERO-CORR-PRD OF WS-CURR-W92-REC         16250099
162600         SET WS-STATUS-5-SEL-YES                                  16260099
162700          TO TRUE                                                 16270099
162800        MOVE WS-CURR-W92-REC                                      16280099
162900          TO WS-SEL-W92-REC                                       16290099
163000     ELSE                                                         16300099
163100       IF REPORTING-STATUS-CORR-PRODUCED OF WS-CURR-W92-REC       16310099
163200          SET WS-STATUS-4-SEL-YES                                 16320099
163300           TO TRUE                                                16330099
163400          PERFORM 6900-INSERT-W92-STATUS-3                        16340099
163500       END-IF                                                     16350099
163600     END-IF.                                                      16360099
163700                                                                  16370099
163800     IF  WS-STATUS-4-SEL-YES                                      16380099
163900     AND WS-STATUS-5-SEL-YES                                      16390099
164000         SET WS-STATUS-2                                          16400099
164100             WS-INSERT                                            16410099
164200             WS-W92                                               16420099
164300             WS-INSERT-NEW-SSN-YES       TO TRUE                  16430099
164400         MOVE MFA-1042S-RPT-ITEM-ID      OF WS-SEL-W92-REC        16440099
164500           TO MFA-1042S-RPT-ITEM-ID      OF MFS-W90-A999          16450099
164600         PERFORM 8500-AUDIT-D86                                   16460099
164700         PERFORM 7400-PREPARE-W92-RECORD                          16470099
164800         PERFORM 7500-INSERT-W92-RECORD                           16480099
164900     END-IF.                                                      16490099
165000                                                                  16500099
165100 3500-GET-CURRENT-SSN.                                            16510099
165200                                                                  16520099
165300     SET WS-TWO-STEP-NO                                           16530099
165400         WS-CHECK-TWO-STEP-RPT-NO                                 16540099
165500         WS-SSN-CHANGE-ONE-STEP       TO TRUE.                    16550099
165600                                                                  16560099
165700     MOVE FUND-CODE                   OF 100-1042S-RPT-INFO-REC   16570099
165800       TO FUND-CODE                   OF MFS-W90-A999.            16580099
165900     MOVE ACCOUNT-NUMBER              OF 100-1042S-RPT-INFO-REC   16590099
166000       TO ACCOUNT-NUMBER              OF MFS-W90-A999.            16600099
166100     MOVE TAX-YR-DT                   OF 100-1042S-RPT-INFO-REC   16610099
166200       TO TAX-YR-DT                   OF MFS-W90-A999.            16620099
166300                                                                  16630099
166400     IF  ACCUMULATION-TYPE-CUSTOMER   OF WS-CURR-W92-REC          16640099
166500     AND REPORTING-STATUS-NOT-CREATED OF WS-CURR-W92-REC          16650099
166600         SET ACCUMULATION-TYPE-IRS    OF MFS-W90-A999 TO TRUE     16660099
166700     ELSE                                                         16670099
166800         MOVE ACCUMULATION-TYPE-CD    OF 100-1042S-RPT-INFO-REC   16680099
166900           TO ACCUMULATION-TYPE-CD    OF MFS-W90-A999             16690099
167000     END-IF.                                                      16700099
167100                                                                  16710099
167200     PERFORM 7700-CHECK-PRIOR-SSN.                                16720099
167300                                                                  16730099
167400     IF WS-SSN-CHANGE-TWO-STEP                                    16740099
167500        CONTINUE                                                  16750099
167600     ELSE                                                         16760099
167700        SET WS-CHECK-TWO-STEP-RPT-YES TO TRUE                     16770099
167800        PERFORM 7700-CHECK-PRIOR-SSN                              16780099
167900        IF WS-SSN-CHANGE-TWO-STEP-RPT                             16790099
168000           CONTINUE                                               16800099
168100        ELSE                                                      16810099
168200           PERFORM 7740-SELECT-CURRENT-SSN                        16820099
168300           MOVE TAX-RSP-TAX-ID        OF MFS-W90-A999             16830099
168400             TO WS-NEW-SSN                                        16840099
168500        END-IF                                                    16850099
168600     END-IF.                                                      16860099
168700                                                                  16870099
168800     IF WS-NEW-SSN  =  TAX-RSP-TAX-ID OF 100-1042S-RPT-INFO-REC   16880099
168900        SET WS-SSN-CHANGE-NO          TO TRUE                     16890099
169000     ELSE                                                         16900099
169100        SET WS-SSN-CHANGE-YES         TO TRUE                     16910099
169200        IF WS-OLD-SSN =                                           16920099
169300           TAX-RSP-TAX-ID OF 100-1042S-RPT-INFO-REC               16930099
169400           SET WS-INPUT-MATCH-OLD-SSN-YES TO TRUE                 16940099
169500        ELSE                                                      16950099
169600           SET WS-INPUT-MATCH-OLD-SSN-NO  TO TRUE                 16960099
169700        END-IF                                                    16970099
169800     END-IF.                                                      16980099
169900                                                                  16990099
152110 3600-INPUT-LESS-W90-PROCESS.                                     15211001
152120                                                                  15212001
152130     IF WS-INPUT-LESS-THAN-W90-YES                                15213001
152140        IF WS-PARTIAL-ALLOCATE-NO                                 15214001
154000           PERFORM 3700-MOVE-SAVE2-WE341Y1-TO-W90                 15400000
154100                                                                  15410000
152195           PERFORM 6550-SELECT-PREV-UNIQUE-ID                     15219501
152197           PERFORM 5600-UPDATE-UNIQUE-FORM-ID                     15219701
152198                                                                  15219801
152199            SET WS-STATUS-2           TO TRUE                     15219901
152200           PERFORM 8050-SSN-CHANGES-AMENDMENT                     15220001
152201                                                                  15220101
152202           MOVE FUND-CODE             OF WS-SAVE2-WE341Y1-W90-KEY215220201
152203             TO FUND-CODE             OF MFS-W90-A999             15220301
152204           MOVE ACCOUNT-NUMBER        OF WS-SAVE2-WE341Y1-W90-KEY215220401
152205             TO ACCOUNT-NUMBER        OF MFS-W90-A999             15220501
152206           MOVE TAX-YR-DT             OF WS-SAVE2-WE341Y1-W90-KEY215220601
152207             TO TAX-YR-DT             OF MFS-W90-A999             15220701
152208           MOVE ACCUMULATION-TYPE-CD  OF WS-SAVE2-WE341Y1-W90-KEY215220801
152209             TO ACCUMULATION-TYPE-CD  OF MFS-W92-A999             15220901
152210            SET REPORTING-STATUS-NOT-CREATED                      15221001
152211             OF MFS-W92-A999          TO TRUE                     15221101
152212           PERFORM 8250-SELECT-W92                                15221201
152213           SET REPORTING-STATUS-CORR-REQUIRED                     15221301
152214            OF MFS-W92-A999           TO TRUE                     15221401
152215           MOVE WS-CUR-AMENDMENT-NBR                              15221501
152216             TO AMENDMENT-NBR         OF MFS-W92-A999             15221601
152217           PERFORM 7350-UPDATE-W92-RECORD                         15221701
152218        END-IF                                                    15221801
152219     END-IF.                                                      15221901
152220                                                                  15222002
156700 3700-MOVE-SAVE2-WE341Y1-TO-W90.                                  15670000
152250                                                                  15225001
152260     MOVE FUND-CODE                   OF WS-SAVE2-WE341Y1-W90-KEY215226001
152270       TO FUND-CODE                   OF MFS-W90-A999.            15227001
152280     MOVE ACCOUNT-NUMBER              OF WS-SAVE2-WE341Y1-W90-KEY215228001
152290       TO ACCOUNT-NUMBER              OF MFS-W90-A999.            15229001
152291     MOVE TAX-YR-DT                   OF WS-SAVE2-WE341Y1-W90-KEY215229101
152292       TO TAX-YR-DT                   OF MFS-W90-A999.            15229201
152293     MOVE ACCUMULATION-TYPE-CD        OF WS-SAVE2-WE341Y1-W90-KEY215229301
152294       TO ACCUMULATION-TYPE-CD        OF MFS-W90-A999.            15229401
152295     MOVE TAX-RSP-ST-CNY-CD           OF WS-SAVE2-WE341Y1-W90-KEY215229501
152296       TO TAX-RSP-ST-CNY-CD           OF MFS-W90-A999.            15229601
152297     MOVE INCOME-TYPE-CD              OF WS-SAVE2-WE341Y1-W90-KEY215229701
152298       TO INCOME-TYPE-CD              OF MFS-W90-A999.            15229801
152299                                                                  15229901
152300     MOVE WS-TAX-RSP-TAX-ID                                       15230001
152301       TO TAX-RSP-TAX-ID              OF MFS-W90-A999.            15230101
152302                                                                  15230201
152303     MOVE CH3-TAX-RT                  OF WS-SAVE2-WE341Y1-W90-KEY215230301
152304       TO CH3-TAX-RT                  OF MFS-W90-A999.            15230401
152305     MOVE CH4-TAX-RT                  OF WS-SAVE2-WE341Y1-W90-KEY215230501
152306       TO CH4-TAX-RT                  OF MFS-W90-A999.            15230601
152307     MOVE CH3-WITHHOLDING-CD          OF WS-SAVE2-WE341Y1-W90-KEY215230701
152308       TO CH3-WITHHOLDING-CD          OF MFS-W90-A999.            15230801
152309     MOVE CH4-WITHHOLDING-CD          OF WS-SAVE2-WE341Y1-W90-KEY215230901
152310       TO CH4-WITHHOLDING-CD          OF MFS-W90-A999.            15231001
152311                                                                  15231101
152312     IF CH3-EXEMPTION-CD              OF WS-SAVE2-WE341Y1-W90-KEY215231201
152313      > SPACES                                                    15231301
152314        SET CH3-EXEMPTION-CD-NN       OF MFS-W90-A999             15231401
152315         TO TRUE                                                  15231501
152316        MOVE CH3-EXEMPTION-CD         OF WS-SAVE2-WE341Y1-W90-KEY215231601
152317          TO CH3-EXEMPTION-CD         OF MFS-W90-A999             15231701
152318     ELSE                                                         15231801
152319        SET CH3-EXEMPTION-CD-NY       OF MFS-W90-A999             15231901
152320         TO TRUE                                                  15232001
152321     END-IF.                                                      15232101
152322                                                                  15232201
152323     IF CH4-EXEMPTION-CD              OF WS-SAVE2-WE341Y1-W90-KEY215232301
152324      > SPACES                                                    15232401
152325         SET CH4-EXEMPTION-CD-NN      OF MFS-W90-A999             15232501
152326          TO TRUE                                                 15232601
152327        MOVE CH4-EXEMPTION-CD         OF WS-SAVE2-WE341Y1-W90-KEY215232701
152328          TO CH4-EXEMPTION-CD         OF MFS-W90-A999             15232801
152329     ELSE                                                         15232901
152330         SET CH4-EXEMPTION-CD-NY      OF MFS-W90-A999             15233001
152331          TO TRUE                                                 15233101
152332     END-IF.                                                      15233201
152333                                                                  15233301
152334     IF TAX-RSP-CH3-STA-CODE-TYP-ID   OF WS-SAVE2-WE341Y1-W90-KEY215233401
152335     IS NUMERIC                                                   15233501
152336     AND TAX-RSP-CH3-STA-CODE-TYP-ID  OF WS-SAVE2-WE341Y1-W90-KEY215233601
152337       > +0                                                       15233701
152338         SET TAX-RSP-CH3-STA-CODE-TYP-ID-NN OF MFS-W90-A999       15233801
152339          TO TRUE                                                 15233901
152340         MOVE TAX-RSP-CH3-STA-CODE-TYP-ID                         15234001
152341                                      OF WS-SAVE2-WE341Y1-W90-KEY215234101
152342          TO TAX-RSP-CH3-STA-CODE-TYP-ID OF MFS-W90-A999          15234201
152343     ELSE                                                         15234301
152344         SET TAX-RSP-CH3-STA-CODE-TYP-ID-NY OF MFS-W90-A999       15234401
152345          TO TRUE                                                 15234501
152346     END-IF.                                                      15234601
152347                                                                  15234701
152348     IF TAX-RSP-CH3-STA-CODE-ID       OF WS-SAVE2-WE341Y1-W90-KEY215234801
152349      > SPACES                                                    15234901
152350         SET TAX-RSP-CH3-STA-CODE-ID-NN OF MFS-W90-A999           15235001
152351          TO TRUE                                                 15235101
152352        MOVE TAX-RSP-CH3-STA-CODE-ID  OF WS-SAVE2-WE341Y1-W90-KEY215235201
152353          TO TAX-RSP-CH3-STA-CODE-ID  OF MFS-W90-A999             15235301
152354     ELSE                                                         15235401
152355         SET TAX-RSP-CH3-STA-CODE-ID-NY OF MFS-W90-A999           15235501
152356          TO TRUE                                                 15235601
152357     END-IF.                                                      15235701
152358                                                                  15235801
152359     IF TAX-RSP-CH4-STA-CODE-TYP-ID OF WS-SAVE2-WE341Y1-W90-KEY2  15235901
152360     IS NUMERIC                                                   15236001
152361     AND  TAX-RSP-CH4-STA-CODE-TYP-ID OF WS-SAVE2-WE341Y1-W90-KEY215236101
152362       > +0                                                       15236201
152363         SET TAX-RSP-CH4-STA-CODE-TYP-ID-NN OF MFS-W90-A999       15236301
152364          TO TRUE                                                 15236401
152365         MOVE TAX-RSP-CH4-STA-CODE-TYP-ID                         15236501
152366                                      OF WS-SAVE2-WE341Y1-W90-KEY215236601
152367          TO TAX-RSP-CH4-STA-CODE-TYP-ID OF MFS-W90-A999          15236701
152368     ELSE                                                         15236801
152369         SET TAX-RSP-CH4-STA-CODE-TYP-ID-NY OF MFS-W90-A999       15236901
152370          TO TRUE                                                 15237001
152371     END-IF.                                                      15237101
152372                                                                  15237201
152373     IF TAX-RSP-CH4-STA-CODE-ID       OF WS-SAVE2-WE341Y1-W90-KEY215237301
152374      > SPACES                                                    15237401
152375         SET TAX-RSP-CH4-STA-CODE-ID-NN OF MFS-W90-A999           15237501
152376          TO TRUE                                                 15237601
152377        MOVE TAX-RSP-CH4-STA-CODE-ID  OF WS-SAVE2-WE341Y1-W90-KEY215237701
152378          TO TAX-RSP-CH4-STA-CODE-ID  OF MFS-W90-A999             15237801
152379     ELSE                                                         15237901
152380         SET TAX-RSP-CH4-STA-CODE-ID-NY OF MFS-W90-A999           15238001
152381          TO TRUE                                                 15238101
152382     END-IF.                                                      15238201
152383                                                                  15238301
152384     IF LMT-ON-BEN-CD                 OF WS-SAVE2-WE341Y1-W90-KEY215238401
152385      > SPACES                                                    15238501
152386         SET LMT-ON-BEN-CD-NN         OF MFS-W90-A999             15238601
152387          TO TRUE                                                 15238701
152388        MOVE LMT-ON-BEN-CD            OF WS-SAVE2-WE341Y1-W90-KEY215238801
152389          TO LMT-ON-BEN-CD            OF MFS-W90-A999             15238901
152390     ELSE                                                         15239001
152391         SET LMT-ON-BEN-CD-NY         OF MFS-W90-A999             15239101
152392          TO TRUE                                                 15239201
152393     END-IF.                                                      15239301
170000                                                                  17000099
170100 4000-CORRECTED-PROCESS.                                          17010099
170200                                                                  17020099
170300     IF WS-STATUS-FOUND-YES                                       17030099
170400        IF UNIQUE-FORM-ID         OF MFS-W90-A999                 17040099
170500         = +0                                                     17050099
170600           PERFORM 4050-UPDATE-UNIQUE-FORM-ID                     17060099
170700        END-IF                                                    17070099
170800     END-IF.                                                      17080099
170900                                                                  17090099
171000     PERFORM 4400-CHECK-STATUS-0-EXIST.                           17100099
171100                                                                  17110099
171200     IF WS-STATUS-0-EXIST-YES                                     17120099
171300        EVALUATE TRUE                                             17130099
171400            WHEN WS-SAVE-WE341Y1-W90-KEY = WS-SAVE-W90-KEY        17140099
171500                 SET WS-STATUS-0 TO TRUE                          17150099
171600                 PERFORM 4600-UPDATE-DLR-UNIQUE-ID                17160099
171700                 PERFORM 7300-UPDATE-W92                          17170099
171800                 PERFORM 7050-FETCH-W90-W92-CURSOR                17180099
171900                 PERFORM 9000-READ-WE341Y1-FILE                   17190099
172000                 PERFORM 6300-CHECK-CURR-WE341Y1-FILE             17200099
172100            WHEN WS-SAVE-WE341Y1-W90-KEY > WS-SAVE-W90-KEY        17210099
172200                 PERFORM 6700-DELETE-W92-PROCESS                  17220099
172300                 PERFORM 6800-DELETE-W90-PROCESS                  17230099
172400                 PERFORM 7050-FETCH-W90-W92-CURSOR                17240099
172500            WHEN WS-SAVE-WE341Y1-W90-KEY < WS-SAVE-W90-KEY        17250099
172600                 SET WS-STATUS-0 TO TRUE                          17260099
153000                 PERFORM 6750-SELECT-W90-KEYS                     15300000
172800                 PERFORM 6400-INSERT-W90-W92                      17280099
172900                 PERFORM 9000-READ-WE341Y1-FILE                   17290099
173000                 PERFORM 6300-CHECK-CURR-WE341Y1-FILE             17300099
173100        END-EVALUATE                                              17310099
173200     ELSE                                                         17320099
173300        PERFORM 4100-UPDATE-NORMAL-PROCESS                        17330099
173400     END-IF.                                                      17340099
173500                                                                  17350099
173510 4050-UPDATE-UNIQUE-FORM-ID.                                      17351099
173520                                                                  17352099
173530     SET WS-UNIQUE-EOF-NO TO TRUE.                                17353099
173540                                                                  17354099
173550     PERFORM 8200-GET-UNIQUE-FORM-ID.                             17355099
173560                                                                  17356099
154500     PERFORM 6850-MOVE-INPUT-TO-W90.                              15450000
173668                                                                  17366899
173669     PERFORM 5100-OPEN-UNIQUE-CURSOR.                             17366999
173670                                                                  17367099
173671     PERFORM 5500-FETCH-UNIQUE-CURSOR.                            17367199
173672                                                                  17367299
173673     PERFORM 5200-UPDATE-UNIQUE-PROCESS                           17367399
173674       UNTIL WS-UNIQUE-EOF-YES.                                   17367499
173675                                                                  17367599
173676     PERFORM 5300-CLOSE-UNIQUE-CURSOR.                            17367699
173677                                                                  17367799
173678                                                                  17367899
173680 4100-UPDATE-NORMAL-PROCESS.                                      17368099
173700                                                                  17370099
173800     EVALUATE TRUE                                                17380099
173900        WHEN WS-SAVE-WE341Y1-W90-KEY = WS-SAVE-W90-KEY            17390099
174000             PERFORM 4120-UPDATE-MATCH-REC                        17400099
174100        WHEN WS-SAVE-WE341Y1-W90-KEY > WS-SAVE-W90-KEY            17410099
174200             PERFORM 4140-UPDATE-UNUSE-REC                        17420099
174300        WHEN WS-SAVE-WE341Y1-W90-KEY < WS-SAVE-W90-KEY            17430099
174400             PERFORM 4160-UPDATE-NEW-REC                          17440099
174500     END-EVALUATE.                                                17450099
174600                                                                  17460099
174700                                                                  17470099
174800 4120-UPDATE-MATCH-REC.                                           17480099
174900                                                                  17490099
175000* OLD SSN WILL NOT BE UPDATED WHEN AMOUNT, NQI, NON-NQI           17500099
175100* ARE CHANGED.                                                    17510099
175200     IF WS-TWO-STEP-YES AND                                       17520099
175300        (REPORTING-STATUS-ZERO-REQUIRED OF WS-CURR-W92-REC OR     17530099
175400         REPORTING-STATUS-ZERO-CORR-PRD OF WS-CURR-W92-REC)       17540099
175500         CONTINUE                                                 17550099
175600     ELSE                                                         17560099
175700         PERFORM 4200-CHECK-CORRECTED-W92                         17570099
175800         PERFORM 9000-READ-WE341Y1-FILE                           17580099
175900         PERFORM 6300-CHECK-CURR-WE341Y1-FILE                     17590099
176000     END-IF.                                                      17600099
176100                                                                  17610099
176200     IF WS-SSN-CHANGE-YES                                         17620099
176300        PERFORM 8120-FETCH-W90-W92-ACCM-CURSOR                    17630099
176400     ELSE                                                         17640099
176500        PERFORM 7050-FETCH-W90-W92-CURSOR                         17650099
176600     END-IF.                                                      17660099
176700                                                                  17670099
176800                                                                  17680099
176900 4140-UPDATE-UNUSE-REC.                                           17690099
177000                                                                  17700099
177100     IF WS-TWO-STEP-YES AND                                       17710099
177200        (REPORTING-STATUS-ZERO-REQUIRED OF WS-CURR-W92-REC OR     17720099
177300         REPORTING-STATUS-ZERO-CORR-PRD OF WS-CURR-W92-REC)       17730099
177400         CONTINUE                                                 17740099
177500     ELSE                                                         17750099
177600         PERFORM 4500-UPDATE-UNUSE-STATUS-3                       17760099
177700     END-IF.                                                      17770099
177800                                                                  17780099
177500     IF WS-CHANGED-SSN-YES                                        17750001
177600        SET  REPORTING-STATUS-CORR-REQUIRED OF MFS-W92-A999       17760001
177700                                            TO TRUE               17770001
177800        PERFORM 8400-SELECT-TWO-STEP-SSN                          17780001
177900        IF  WS-SSN-FOUND-YES                                      17790001
178000            SET WS-STATUS-2-EXIST-YES       TO TRUE               17800001
178100        ELSE                                                      17810001
178200            SET WS-STATUS-2-EXIST-NO        TO TRUE               17820001
178300        END-IF                                                    17830001
178310                                                                  17831001
178311        SET REPORTING-STATUS-ZERO-REQUIRED  OF MFS-W92-A999       17831101
178312                                            TO TRUE               17831201
178313        PERFORM 8400-SELECT-TWO-STEP-SSN                          17831301
178314        IF  WS-SSN-FOUND-YES                                      17831401
178315            SET WS-STATUS-3-EXIST-YES       TO TRUE               17831501
178316        ELSE                                                      17831601
178317            SET WS-STATUS-3-EXIST-NO        TO TRUE               17831701
178318        END-IF                                                    17831801
178319        IF WS-STATUS-2-EXIST-YES AND WS-STATUS-3-EXIST-YES        17831901
178320           CONTINUE                                               17832001
178330        ELSE                                                      17833001
178340           MOVE WS-SAVE-TAX-YR-DT                                 17834001
178350             TO TAX-YR-DT                   OF MFS-W92-A999       17835001
178360                TAX-YR-DT                   OF MFS-W90-A999       17836001
178370           MOVE WS-SAVE-FUND-CODE                                 17837001
178380             TO FUND-CODE                   OF MFS-W92-A999       17838001
178390                FUND-CODE                   OF MFS-W90-A999       17839001
178400           MOVE WS-SAVE-ACCOUNT-NUMBER                            17840001
178401             TO ACCOUNT-NUMBER              OF MFS-W92-A999       17840101
178402                ACCOUNT-NUMBER              OF MFS-W90-A999       17840201
178403           MOVE WS-SAVE-ACCUMULATION-TYPE-CD                      17840301
178404             TO ACCUMULATION-TYPE-CD        OF MFS-W92-A999       17840401
178405                ACCUMULATION-TYPE-CD        OF MFS-W90-A999       17840501
178406           MOVE WS-SAVE-MFA-1042S-RPT-ITEM-ID                     17840601
178407             TO MFA-1042S-RPT-ITEM-ID       OF MFS-W92-A999       17840701
178408           MOVE WS-SAVE-ADD-DT-TM                                 17840801
178409             TO ADD-DT-TM                   OF MFS-W92-A999       17840901
178410           PERFORM 8850-CHECK-STATUS                              17841001
178424           IF WS-REPORTING-NOT-CREATED                            17842401
178425              SET WS-UPDATE                                       17842501
178426                  WS-W92 TO TRUE                                  17842601
178427              PERFORM 8500-AUDIT-D86                              17842701
178428              SET REPORTING-STATUS-ZERO-REQUIRED  OF MFS-W92-A999 17842801
178429                                                  TO TRUE         17842901
178430              PERFORM 8400-SELECT-TWO-STEP-SSN                    17843001
178431              ADD +1                                              17843101
178432               TO AMENDMENT-NBR        OF MFS-W92-A999            17843201
178433              SET REPORTING-STATUS-CORR-REQUIRED                  17843301
178434                                       OF MFS-W92-A999 TO TRUE    17843401
178435              PERFORM 7350-UPDATE-W92-RECORD                      17843501
178436           END-IF                                                 17843601
178437        END-IF                                                    17843701
178438     END-IF.                                                      17843801
178439                                                                  17843901
177900     IF WS-SSN-CHANGE-YES                                         17790099
178000        PERFORM 8120-FETCH-W90-W92-ACCM-CURSOR                    17800099
178100     ELSE                                                         17810099
178200        PERFORM 7050-FETCH-W90-W92-CURSOR                         17820099
178300     END-IF.                                                      17830099
178400                                                                  17840099
178500                                                                  17850099
178600 4160-UPDATE-NEW-REC.                                             17860099
178700                                                                  17870099
178451     MOVE ACCUMULATION-TYPE-CD OF 100-1042S-RPT-INFO-REC          17845101
178460       TO ACCUMULATION-TYPE-CD OF MFS-W90-A999.                   17846001
178800     SET  REPORTING-STATUS-CORR-REQUIRED OF MFS-W92-A999          17880099
178900                                         TO TRUE.                 17890099
179000     PERFORM 8400-SELECT-TWO-STEP-SSN.                            17900099
179100     IF  WS-SSN-FOUND-YES                                         17910099
179200         SET WS-STATUS-2-EXIST-YES       TO TRUE                  17920099
179300         MOVE TAX-RSP-TAX-ID             OF MFS-W90-A999          17930099
179400           TO WS-NEW-SSN-STA-2                                    17940099
179500     ELSE                                                         17950099
179600         SET WS-STATUS-2-EXIST-NO        TO TRUE                  17960099
179700     END-IF.                                                      17970099
179800                                                                  17980099
179900     SET REPORTING-STATUS-ZERO-REQUIRED  OF MFS-W92-A999          17990099
180000                                         TO TRUE.                 18000099
180100     PERFORM 8400-SELECT-TWO-STEP-SSN.                            18010099
180200     IF  WS-SSN-FOUND-YES                                         18020099
180300         SET WS-STATUS-3-EXIST-YES       TO TRUE                  18030099
180400         MOVE TAX-RSP-TAX-ID             OF MFS-W90-A999          18040099
180500           TO WS-OLD-SSN-STA-3                                    18050099
180600     ELSE                                                         18060099
180700         SET WS-STATUS-3-EXIST-NO        TO TRUE                  18070099
180800     END-IF.                                                      18080099
180900                                                                  18090099
181000     IF WS-STATUS-2-EXIST-YES AND WS-STATUS-3-EXIST-YES           18100099
181100     AND (WS-SSN-CHANGE-YES OR WS-CORRECTED-ACTION)               18110099
181200         SET WS-PARTIAL-REALLOCATE-YES   TO TRUE                  18120099
181300     ELSE                                                         18130099
181400        IF WS-SSN-CHANGE-YES OR WS-CORRECTED-ACTION               18140099
181500           SET WS-PARTIAL-REALLOCATE-YES TO TRUE                  18150099
181600        ELSE                                                      18160099
181700           SET WS-PARTIAL-REALLOCATE-NO  TO TRUE                  18170099
181800        END-IF                                                    18180099
181900     END-IF.                                                      18190099
180700                                                                  18070000
182100     IF WS-W90-W92-ACCM-EOC-YES OR WS-W90-W92-EOC-YES             18210099
182200        IF WS-STATUS-2-EXIST-YES AND WS-STATUS-3-EXIST-YES        18220099
182300           IF WS-SSN-CHANGE-YES                                   18230099
182400              IF WS-PARTIAL-REALLOCATE-YES                        18240099
182500                 SET WS-STATUS-0         TO TRUE                  18250099
182600              ELSE                                                18260099
182700                 SET WS-STATUS-2         TO TRUE                  18270099
182800              END-IF                                              18280099
182900           ELSE                                                   18290099
183000              IF WS-CORRECTED-ACTION                              18300099
183100                 SET WS-STATUS-0         TO TRUE                  18310099
183200              ELSE                                                18320099
183300                 IF WS-PARTIAL-REALLOCATE-YES                     18330099
183400                    SET WS-STATUS-2      TO TRUE                  18340099
183500                 ELSE                                             18350099
183600                    SET WS-STATUS-0      TO TRUE                  18360099
183700                 END-IF                                           18370099
183800              END-IF                                              18380099
183900           END-IF                                                 18390099
184000        ELSE                                                      18400099
184100           IF WS-CHANGED-SSN-YES                                  18410099
184200              SET WS-STATUS-2            TO TRUE                  18420099
184300           ELSE                                                   18430099
184400              SET WS-STATUS-0            TO TRUE                  18440099
184500           END-IF                                                 18450099
184600        END-IF                                                    18460099
165400        PERFORM 5700-CHECK-EXIST-KEY                              16540007
184800        PERFORM 9000-READ-WE341Y1-FILE                            18480099
184900        PERFORM 6300-CHECK-CURR-WE341Y1-FILE                      18490099
185000     ELSE                                                         18500099
185100        IF WS-TWO-STEP-YES AND                                    18510099
185200          (REPORTING-STATUS-ZERO-REQUIRED OF WS-CURR-W92-REC OR   18520099
185300           REPORTING-STATUS-ZERO-CORR-PRD OF WS-CURR-W92-REC)     18530099
185400           IF WS-SSN-CHANGE-YES                                   18540099
185500              PERFORM 8120-FETCH-W90-W92-ACCM-CURSOR              18550099
185600           ELSE                                                   18560099
185700              PERFORM 7050-FETCH-W90-W92-CURSOR                   18570099
185800           END-IF                                                 18580099
185900        ELSE                                                      18590099
186000           IF WS-STATUS-2-EXIST-YES AND WS-STATUS-3-EXIST-YES     18600099
186100               IF WS-SSN-CHANGE-YES                               18610099
186200                  IF WS-PARTIAL-REALLOCATE-YES                    18620099
186300                     SET WS-STATUS-0 TO TRUE                      18630099
186400                  ELSE                                            18640099
186500                     SET WS-STATUS-2 TO TRUE                      18650099
186600                  END-IF                                          18660099
186700               ELSE                                               18670099
186800                  IF WS-CORRECTED-ACTION                          18680099
186900                     SET WS-STATUS-0 TO TRUE                      18690099
187000                  ELSE                                            18700099
187100                     IF WS-PARTIAL-REALLOCATE-YES                 18710099
187200                        SET WS-STATUS-2 TO TRUE                   18720099
187300                     ELSE                                         18730099
187400                        SET WS-STATUS-0 TO TRUE                   18740099
187500                     END-IF                                       18750099
187600                  END-IF                                          18760099
187700               END-IF                                             18770099
187800           ELSE                                                   18780099
187900               SET WS-STATUS-0 TO TRUE                            18790099
188000           END-IF                                                 18800099
168800           PERFORM 5700-CHECK-EXIST-KEY                           16880007
188200           PERFORM 9000-READ-WE341Y1-FILE                         18820099
188300           PERFORM 6300-CHECK-CURR-WE341Y1-FILE                   18830099
188400        END-IF                                                    18840099
188500     END-IF.                                                      18850099
188600                                                                  18860099
188700                                                                  18870099
188800 4200-CHECK-CORRECTED-W92.                                        18880099
188900                                                                  18890099
189000     PERFORM 4300-COMPARE-WE341Y1-W92.                            18900099
189100                                                                  18910099
189200     IF REPORTING-STATUS-PRODUCED         OF WS-CURR-W92-REC OR   18920099
189300        REPORTING-STATUS-CORR-PRODUCED    OF WS-CURR-W92-REC OR   18930099
189400        REPORTING-STATUS-ZERO-CORR-PRD    OF WS-CURR-W92-REC      18940099
189500        PERFORM 6000-STATUS-145-CORRECTED                         18950099
189600     ELSE                                                         18960099
189700        IF REPORTING-STATUS-CORR-REQUIRED OF WS-CURR-W92-REC OR   18970099
189800           REPORTING-STATUS-ZERO-REQUIRED OF WS-CURR-W92-REC OR   18980099
189900           REPORTING-STATUS-NOT-CREATED   OF WS-CURR-W92-REC      18990099
190000           PERFORM 6100-STATUS-23-CORRECTED                       19000099
190100        END-IF                                                    19010099
190200     END-IF.                                                      19020099
190300                                                                  19030099
190400                                                                  19040099
208500 4300-COMPARE-WE341Y1-W92.                                        20850099
208600                                                                  20860099
208700     SET WS-NO-ACTION TO TRUE.                                    20870099
208800                                                                  20880099
208900     IF  GROSS-INCOME-AT             OF WS-CURR-W92-REC           20890099
209000       = GROSS-INCOME-AT             OF 100-1042S-RPT-INFO-REC    20900099
209100     AND TAX-WITHHOLDING-AT          OF WS-CURR-W92-REC           20910099
209200       = TAX-WITHHOLDING-AT          OF 100-1042S-RPT-INFO-REC    20920099
209300     AND TAX-RSP-GIIN-EXTERNAL-ID    OF WS-CURR-W92-REC           20930099
209400       = TAX-RSP-GIIN-EXTERNAL-ID    OF 100-1042S-RPT-INFO-REC    20940099
209500     AND TAX-RSP-FOREIGN-TAX-ID      OF WS-CURR-W92-REC           20950099
209600       = TAX-RSP-FOREIGN-TAX-ID      OF 100-1042S-RPT-INFO-REC    20960099
209700     AND TAX-RSP-BIRTH-DT            OF WS-CURR-W92-REC           20970099
209800       = TAX-RSP-BIRTH-DT            OF 100-1042S-RPT-INFO-REC    20980099
209900        IF  NQI-EIN-ID               OF WS-CURR-W92-REC           20990099
210000          = NQI-EIN-ID               OF 100-1042S-RPT-INFO-REC    21000099
210100        AND NQI-GIIN-EXTERNAL-ID     OF WS-CURR-W92-REC           21010099
210200          = NQI-GIIN-EXTERNAL-ID     OF 100-1042S-RPT-INFO-REC    21020099
210300        AND NQI-STATE-COUNTRY-CD     OF WS-CURR-W92-REC           21030099
210400          = NQI-STATE-COUNTRY-CD     OF 100-1042S-RPT-INFO-REC    21040099
210500        AND NQI-FOREIGN-TAX-ID       OF WS-CURR-W92-REC           21050099
210600          = NQI-FOREIGN-TAX-ID       OF 100-1042S-RPT-INFO-REC    21060099
210700        AND NQI-CH3-STA-CODE-TYPE-ID OF WS-CURR-W92-REC           21070099
210800          = NQI-CH3-STA-CODE-TYPE-ID OF 100-1042S-RPT-INFO-REC    21080099
210900        AND NQI-CH3-STA-CODE-ID      OF WS-CURR-W92-REC           21090099
211000          = NQI-CH3-STA-CODE-ID      OF 100-1042S-RPT-INFO-REC    21100099
211100        AND NQI-CH4-STA-CODE-TYPE-ID OF WS-CURR-W92-REC           21110099
211200          = NQI-CH4-STA-CODE-TYPE-ID OF 100-1042S-RPT-INFO-REC    21120099
211300        AND NQI-CH4-STA-CODE-ID      OF WS-CURR-W92-REC           21130099
211400          = NQI-CH4-STA-CODE-ID      OF 100-1042S-RPT-INFO-REC    21140099
211500            CONTINUE                                              21150099
211600        ELSE                                                      21160099
211700            SET WS-UPDATE-ACTION     TO TRUE                      21170099
211800        END-IF                                                    21180099
211900     ELSE                                                         21190099
212000         SET WS-CORRECTED-ACTION     TO TRUE                      21200099
212100     END-IF.                                                      21210099
212200                                                                  21220099
212300                                                                  21230099
212400 4400-CHECK-STATUS-0-EXIST.                                       21240099
212500                                                                  21250099
212600     SET WS-STATUS-0-EXIST-NO  TO TRUE.                           21260099
212700                                                                  21270099
212800     IF WS-WE341Y1-EOF-YES                                        21280099
212900        IF REPORTING-STATUS-NOT-CREATED       OF WS-CURR-W92-REC  21290099
213000           SET WS-STATUS-0-EXIST-YES          TO TRUE             21300099
213100        END-IF                                                    21310099
213200     ELSE                                                         21320099
213300        IF WS-SAVE-WE341Y1-W90-KEY > WS-SAVE-W90-KEY              21330099
213400           IF REPORTING-STATUS-NOT-CREATED    OF WS-CURR-W92-REC  21340099
213500              SET WS-STATUS-0-EXIST-YES       TO TRUE             21350099
213600           END-IF                                                 21360099
213700        ELSE                                                      21370099
213800           IF ACCUMULATION-TYPE-CUSTOMER OF 100-1042S-RPT-INFO-REC21380099
213900              IF WS-STATUS-0-CMR-YES                              21390099
214000                 SET WS-STATUS-0-EXIST-YES    TO TRUE             21400099
214100              END-IF                                              21410099
214200           ELSE                                                   21420099
214300              IF ACCUMULATION-TYPE-IRS   OF 100-1042S-RPT-INFO-REC21430099
214400                 IF WS-STATUS-0-IRS-YES                           21440099
214500                    SET WS-STATUS-0-EXIST-YES TO TRUE             21450099
214600                 END-IF                                           21460099
214700              ELSE                                                21470099
214800                 SET WS-STATUS-0-EXIST-YES    TO TRUE             21480099
214900              END-IF                                              21490099
215000           END-IF                                                 21500099
215100        END-IF                                                    21510099
215200     END-IF.                                                      21520099
215300                                                                  21530099
215400                                                                  21540099
215500 4500-UPDATE-UNUSE-STATUS-3.                                      21550099
215600                                                                  21560099
215700     IF REPORTING-STATUS-ZERO-CORR-PRD     OF WS-CURR-W92-REC     21570099
215800        CONTINUE                                                  21580099
215900     ELSE                                                         21590099
216000        IF REPORTING-STATUS-CORR-REQUIRED  OF WS-CURR-W92-REC     21600099
216100           PERFORM 7900-SELECT-PREV-STATUS                        21610099
216200           IF REPORTING-STATUS-CD          OF MFS-W92-A999        21620099
216300              = SPACE                                             21630099
216400              SET WS-DELETE-ACTION-YES     TO TRUE                21640099
216500           ELSE                                                   21650099
216600              SET WS-DELETE-ACTION-NO      TO TRUE                21660099
216700           END-IF                                                 21670099
216800        END-IF                                                    21680099
216900        IF WS-DELETE-ACTION-YES                                   21690099
217000           PERFORM 6700-DELETE-W92-PROCESS                        21700099
217100           PERFORM 6800-DELETE-W90-PROCESS                        21710099
217200        ELSE                                                      21720099
217300           PERFORM 8700-CALL-SR0622                               21730099
217400           MOVE WS-CURR-W92-REC               TO MFS-W92-A999     21740099
217500           MOVE WS-JOB-ID                                         21750099
217600             TO ADD-JOB-ID                    OF MFS-W92-A999     21760099
217700           MOVE ZEROS                                             21770099
217800             TO GROSS-INCOME-AT               OF MFS-W92-A999     21780099
217900                TAX-WITHHOLDING-AT            OF MFS-W92-A999     21790099
218000           MOVE PARM-TIMESTAMP                OF PSR0622          21800099
218100             TO LAST-MNT-DATE-TIME            OF MFS-W92-A999     21810099
218200           MOVE WS-CURRENT-DATE                                   21820099
218300             TO REPORTING-STATUS-DT           OF MFS-W92-A999     21830099
218400           SET REPORTING-STATUS-DT-NN         OF MFS-W92-A999     21840099
218500               REPORTING-STATUS-ZERO-REQUIRED OF MFS-W92-A999     21850099
218600               WS-W92                                             21860099
218700               TO TRUE                                            21870099
218800           PERFORM 8000-SET-W92-NULL-INDICATOR                    21880099
218900           IF REPORTING-STATUS-CORR-REQUIRED  OF WS-CURR-W92-REC  21890099
219000           OR REPORTING-STATUS-ZERO-REQUIRED  OF WS-CURR-W92-REC  21900099
219100              SET WS-UPDATE TO TRUE                               21910099
219200              PERFORM 8500-AUDIT-D86                              21920099
219300              PERFORM 7350-UPDATE-W92-RECORD                      21930099
219400           ELSE                                                   21940099
219500              SET WS-INSERT TO TRUE                               21950099
219600              PERFORM 8500-AUDIT-D86                              21960099
219700              MOVE PARM-TIMESTAMP          OF PSR0622             21970099
219800                TO ADD-DT-TM               OF MFS-W92-A999        21980099
219900              MOVE MFA-1042S-RPT-ITEM-ID   OF WS-CURR-W92-REC     21990099
220000                TO MFA-1042S-RPT-ITEM-ID   OF MFS-W90-A999        22000099
220100              IF REPORTING-STATUS-PRODUCED      OF WS-CURR-W92-REC22010099
220200              OR REPORTING-STATUS-CORR-PRODUCED OF WS-CURR-W92-REC22020099
220300                 ADD +1                                           22030099
220400                  TO AMENDMENT-NBR          OF MFS-W92-A999       22040099
220500              END-IF                                              22050099
220600              PERFORM 7500-INSERT-W92-RECORD                      22060099
220700           END-IF                                                 22070099
220800        END-IF                                                    22080099
220900     END-IF.                                                      22090099
221000                                                                  22100099
221100 4600-UPDATE-DLR-UNIQUE-ID.                                       22110099
221200                                                                  22120099
221300     IF ACCUMULATION-TYPE-DLR  OF 100-1042S-RPT-INFO-REC          22130099
221400        IF UNIQUE-FORM-ID      OF WS-CURR-W90-REC                 22140099
221500        = 0                                                       22150099
221600           MOVE WS-CURR-W90-REC                                   22160099
221700             TO MFS-W90-A999                                      22170099
221800           PERFORM 8200-GET-UNIQUE-FORM-ID                        22180099
221900           MOVE WS-NEXT-UNIQUE-FORM-ID                            22190099
222000             TO UNIQUE-FORM-ID OF MFS-W90-A999                    22200099
222100           PERFORM 5600-UPDATE-UNIQUE-FORM-ID                     22210099
222200        END-IF                                                    22220099
207300     END-IF.                                                      20730007
207400                                                                  20740007
230400 5000-CANCEL-TRAN-PROCESS.                                        23040099
230500                                                                  23050099
230600     EVALUATE TRUE                                                23060099
230700        WHEN REPORTING-STATUS-NOT-CREATED      OF WS-CURR-W92-REC 23070099
230800             PERFORM 6700-DELETE-W92-PROCESS                      23080099
230900             PERFORM 6800-DELETE-W90-PROCESS                      23090099
231000        WHEN REPORTING-STATUS-PRODUCED         OF WS-CURR-W92-REC 23100099
231100        WHEN REPORTING-STATUS-CORR-PRODUCED    OF WS-CURR-W92-REC 23110099
231200             PERFORM 6900-INSERT-W92-STATUS-3                     23120099
231300        WHEN REPORTING-STATUS-CORR-REQUIRED    OF WS-CURR-W92-REC 23130099
231400             PERFORM 7900-SELECT-PREV-STATUS                      23140099
231500             IF REPORTING-STATUS-ZERO-CORR-PRD OF MFS-W92-A999    23150099
231600                PERFORM 6700-DELETE-W92-PROCESS                   23160099
231700             ELSE                                                 23170099
231800               IF REPORTING-STATUS-CD            OF MFS-W92-A999  23180099
231900                  = SPACE                                         23190099
232000                  PERFORM 6700-DELETE-W92-PROCESS                 23200099
232100                  PERFORM 6800-DELETE-W90-PROCESS                 23210099
232200               ELSE                                               23220099
232300                  PERFORM 6950-UPDATE-W92-STATUS-3                23230099
232400               END-IF                                             23240099
232500             END-IF                                               23250099
232600     END-EVALUATE.                                                23260099
232700                                                                  23270099
232800     PERFORM 7050-FETCH-W90-W92-CURSOR.                           23280099
232900                                                                  23290099
232910 5100-OPEN-UNIQUE-CURSOR.                                         23291099
232920                                                                  23292099
232930     EXEC  SQL                                                    23293099
232940          OPEN W90_UNIQUE_CURSOR                                  23294099
232950     END-EXEC.                                                    23295099
232960                                                                  23296099
232970     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE OF WS00575.             23297099
232980                                                                  23298099
232990     EVALUATE TRUE                                                23299099
232991       WHEN SQL-RETURN-SUCCESSFUL         OF WS00575              23299199
232992            CONTINUE                                              23299299
232993       WHEN OTHER                                                 23299399
232994            DISPLAY '************ B27935 ABENDING ************'   23299499
232995               UPON CONSOLE                                       23299599
232996            DISPLAY '* PARAGRAPH : 5100-OPEN-UNIQUE-CURSOR   *'   23299699
232997               UPON CONSOLE                                       23299799
232998            DISPLAY '* UNSUCCESSFUL OPEN W90_UNIQUE_CURSOR   *'   23299899
232999               UPON CONSOLE                                       23299999
233000            DISPLAY '* RETURN CODE    : '                         23300099
233001                    SQLSTATE-RETURN-CDE   OF WS00575              23300199
233002               UPON CONSOLE                                       23300299
233003            DISPLAY '* FUND CODE      : '                         23300399
233004                    FUND-CODE             OF MFS-W90-A999         23300499
233005               UPON CONSOLE                                       23300599
233006            DISPLAY '* ACCOUNT NUMBER : '                         23300699
233007                    ACCOUNT-NUMBER        OF MFS-W90-A999         23300799
233008               UPON CONSOLE                                       23300899
233009            DISPLAY '* TAX YEAR       : '                         23300999
233010                    TAX-YR-DT             OF MFS-W90-A999         23301099
233011               UPON CONSOLE                                       23301199
233012            DISPLAY '*****************************************'   23301299
233013               UPON CONSOLE                                       23301399
233014            CALL SR0002                                           23301499
233015     END-EVALUATE.                                                23301599
233016                                                                  23301699
233017 5200-UPDATE-UNIQUE-PROCESS.                                      23301799
233018                                                                  23301899
233019     PERFORM 5600-UPDATE-UNIQUE-FORM-ID.                          23301999
233020     PERFORM 5500-FETCH-UNIQUE-CURSOR.                            23302099
233021                                                                  23302199
233022 5300-CLOSE-UNIQUE-CURSOR.                                        23302299
233023                                                                  23302399
233024     EXEC SQL                                                     23302499
233025       CLOSE W90_UNIQUE_CURSOR                                    23302599
233026     END-EXEC.                                                    23302699
233027                                                                  23302799
233028     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE OF WS00575.             23302899
233029                                                                  23302999
233030     EVALUATE TRUE                                                23303099
233031       WHEN SQL-RETURN-SUCCESSFUL         OF WS00575              23303199
233032            CONTINUE                                              23303299
233033       WHEN OTHER                                                 23303399
233034            DISPLAY '************ B27935 ABENDING ************'   23303499
233035               UPON CONSOLE                                       23303599
233036            DISPLAY '* PARAGRAPH : 5300-CLOSE-UNIQUE-CURSOR  *'   23303699
233037               UPON CONSOLE                                       23303799
233038            DISPLAY '* UNSUCCESSFUL CLOSE W90_UNIQUE_CURSOR  *'   23303899
233039               UPON CONSOLE                                       23303999
233040            DISPLAY '* RETURN CODE    : '                         23304099
233041                    SQLSTATE-RETURN-CDE   OF WS00575              23304199
233042               UPON CONSOLE                                       23304299
233043            DISPLAY '* FUND CODE      : '                         23304399
233044                    FUND-CODE             OF MFS-W90-A999         23304499
233045               UPON CONSOLE                                       23304599
233046            DISPLAY '* ACCOUNT NUMBER : '                         23304699
233047                    ACCOUNT-NUMBER        OF MFS-W90-A999         23304799
233048               UPON CONSOLE                                       23304899
233049            DISPLAY '* TAX YEAR       : '                         23304999
233050                    TAX-YR-DT             OF MFS-W90-A999         23305099
233051               UPON CONSOLE                                       23305199
233052            DISPLAY '*****************************************'   23305299
233053               UPON CONSOLE                                       23305399
233054            CALL SR0002                                           23305499
233055     END-EVALUATE.                                                23305599
233056                                                                  23305699
233057 5500-FETCH-UNIQUE-CURSOR.                                        23305799
233058                                                                  23305899
233059     EXEC SQL                                                     23305999
233060       FETCH W90_UNIQUE_CURSOR                                    23306099
233061       INTO                                                       23306199
233062           :MFS-W90-A999.UNIQUE-FORM-ID                           23306299
233063     END-EXEC.                                                    23306399
233064                                                                  23306499
233065     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE  OF WS00575.            23306599
233066                                                                  23306699
233067     EVALUATE TRUE                                                23306799
233068       WHEN SQL-RETURN-SUCCESSFUL          OF WS00575             23306899
233069            MOVE WS-NEXT-UNIQUE-FORM-ID                           23306999
233070              TO UNIQUE-FORM-ID            OF MFS-W90-A999        23307099
233071       WHEN SQL-RETURN-END-OF-CURSOR       OF WS00575             23307199
233072            SET WS-UNIQUE-EOF-YES          TO TRUE                23307299
233073       WHEN OTHER                                                 23307399
233074            DISPLAY '************ B27935 ABENDING ************'   23307499
233075               UPON CONSOLE                                       23307599
233076            DISPLAY '* PARAGRAPH : 5500-FETCH-UNIQUE-CURSOR  *'   23307699
233077               UPON CONSOLE                                       23307799
233078            DISPLAY '* UNSUCCESSFUL FETCH W90_UNIQUE_CURSOR  *'   23307899
233079               UPON CONSOLE                                       23307999
233080            DISPLAY '* RETURN CODE    : '                         23308099
233081                    SQLSTATE-RETURN-CDE    OF WS00575             23308199
233082               UPON CONSOLE                                       23308299
233083            DISPLAY '* FUND CODE      : '                         23308399
233084                    FUND-CODE              OF MFS-W90-A999        23308499
233085               UPON CONSOLE                                       23308599
233086            DISPLAY '* ACCOUNT NUMBER : '                         23308699
233087                    ACCOUNT-NUMBER         OF MFS-W90-A999        23308799
233088               UPON CONSOLE                                       23308899
233089            DISPLAY '* TAX YEAR       : '                         23308999
233090                    TAX-YR-DT              OF MFS-W90-A999        23309099
233091               UPON CONSOLE                                       23309199
233092            DISPLAY '*****************************************'   23309299
233093               UPON CONSOLE                                       23309399
233094            CALL SR0002                                           23309499
233095     END-EVALUATE.                                                23309599
233096                                                                  23309699
233097 5600-UPDATE-UNIQUE-FORM-ID.                                      23309799
233098                                                                  23309899
233099     EXEC SQL                                                     23309999
233100       UPDATE W90_A999                                            23310099
233101            SET UNIQUE_FORM_ID                                    23310199
233102              = :MFS-W90-A999.UNIQUE-FORM-ID                      23310299
233103        WHERE FUND_CODE                                           23310399
233104              = :MFS-W90-A999.FUND-CODE                           23310499
233105          AND ACCOUNT_NUMBER                                      23310599
233106              = :MFS-W90-A999.ACCOUNT-NUMBER                      23310699
233107          AND TAX_YR_DT                                           23310799
233108              = :MFS-W90-A999.TAX-YR-DT                           23310899
233109          AND TAX_RSP_ST_CNY_CD                                   23310999
233110              = :MFS-W90-A999.TAX-RSP-ST-CNY-CD                   23311099
233111          AND INCOME_TYPE_CD                                      23311199
233112              = :MFS-W90-A999.INCOME-TYPE-CD                      23311299
233113          AND TAX_RSP_TAX_ID                                      23311399
233114               IS NOT DISTINCT FROM                               23311499
233115                 :MFS-W90-A999.TAX-RSP-TAX-ID                     23311599
233116                  INDICATOR                                       23311699
233117                 :MFS-W90-A999.TAX-RSP-TAX-ID-NC                  23311799
233118          AND CH3_TAX_RT                                          23311899
233119              = :MFS-W90-A999.CH3-TAX-RT                          23311999
233120          AND CH4_TAX_RT                                          23312099
233121              = :MFS-W90-A999.CH4-TAX-RT                          23312199
233122          AND CH3_WITHHOLDING_CD                                  23312299
233123              = :MFS-W90-A999.CH3-WITHHOLDING-CD                  23312399
233124          AND CH4_WITHHOLDING_CD                                  23312499
233125              = :MFS-W90-A999.CH4-WITHHOLDING-CD                  23312599
233126          AND CH3_EXEMPTION_CD                                    23312699
233127               IS NOT DISTINCT FROM                               23312799
233128                 :MFS-W90-A999.CH3-EXEMPTION-CD                   23312899
233129                  INDICATOR                                       23312999
233130                 :MFS-W90-A999.CH3-EXEMPTION-CD-NC                23313099
233131          AND CH4_EXEMPTION_CD                                    23313199
233132               IS NOT DISTINCT FROM                               23313299
233133                 :MFS-W90-A999.CH4-EXEMPTION-CD                   23313399
233134                  INDICATOR                                       23313499
233135                 :MFS-W90-A999.CH4-EXEMPTION-CD-NC                23313599
233136          AND TAX_RSP_CH3_STA_CODE_TYP_ID                         23313699
233137              IS NOT DISTINCT FROM                                23313799
233138                 :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-TYP-ID        23313899
233139                  INDICATOR                                       23313999
233140                 :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-TYP-ID-NC     23314099
233141          AND TAX_RSP_CH3_STA_CODE_ID                             23314199
233142              IS NOT DISTINCT FROM                                23314299
233143                 :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-ID            23314399
233144                  INDICATOR                                       23314499
233145                 :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-ID-NC         23314599
233146          AND TAX_RSP_CH4_STA_CODE_TYP_ID                         23314699
233147              IS NOT DISTINCT FROM                                23314799
233148                 :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-TYP-ID        23314899
233149                  INDICATOR                                       23314999
233150                 :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-TYP-ID-NC     23315099
233151          AND TAX_RSP_CH4_STA_CODE_ID                             23315199
233152              IS NOT DISTINCT FROM                                23315299
233153                 :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-ID            23315399
233154                  INDICATOR                                       23315499
233155                 :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-ID-NC         23315599
233156          AND LMT_ON_BEN_CD                                       23315699
233157              IS NOT DISTINCT FROM                                23315799
233158                 :MFS-W90-A999.LMT-ON-BEN-CD                      23315899
233159                  INDICATOR                                       23315999
233160                 :MFS-W90-A999.LMT-ON-BEN-CD-NC                   23316099
233161     END-EXEC.                                                    23316199
233162                                                                  23316299
233163     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE   OF WS00575.           23316399
233164                                                                  23316499
233165     EVALUATE TRUE                                                23316599
233166         WHEN SQL-RETURN-SUCCESSFUL         OF WS00575            23316699
233167              CONTINUE                                            23316799
233168         WHEN OTHER                                               23316899
233169              DISPLAY '************ B27935 ABENDING ************' 23316999
233170                 UPON CONSOLE                                     23317099
233171              DISPLAY '* PARAGRAPH: 5600-UPDATE-UNIQUE-FORM-ID *' 23317199
233172                 UPON CONSOLE                                     23317299
229200              DISPLAY '* UNSUCCESSFUL UPDATE W90 TABLE         *' 22920007
233174                 UPON CONSOLE                                     23317499
233175              DISPLAY '* RETURN CODE    : '                       23317599
233176                      SQLSTATE-RETURN-CDE    OF WS00575           23317699
233177                 UPON CONSOLE                                     23317799
233178              DISPLAY '* FUND CODE      : '                       23317899
229800                      FUND-CODE              OF MFS-W90-A999      22980007
233180                 UPON CONSOLE                                     23318099
233181              DISPLAY '* ACCOUNT NUMBER : '                       23318199
230100                      ACCOUNT-NUMBER         OF MFS-W90-A999      23010007
233183                 UPON CONSOLE                                     23318399
233184              DISPLAY '* TAX YEAR       : '                       23318499
230400                      TAX-YR-DT              OF MFS-W90-A999      23040007
233186                 UPON CONSOLE                                     23318699
230600              DISPLAY '* INCOME-TYPE-CD : '                       23060007
230700                      INCOME-TYPE-CD         OF MFS-W90-A999      23070007
233189                 UPON CONSOLE                                     23318999
230900              DISPLAY '* TAX-RSP-TAX-ID :'                        23090007
231000                      TAX-RSP-TAX-ID         OF MFS-W90-A999      23100007
233195                 UPON CONSOLE                                     23319599
233196              DISPLAY '*****************************************' 23319699
233197                 UPON CONSOLE                                     23319799
233198              CALL SR0002                                         23319899
233199     END-EVALUATE.                                                23319999
231600                                                                  23160007
231700 5700-CHECK-EXIST-KEY.                                            23170007
231800                                                                  23180007
231900     SET WS-KEY-EXIST-NO TO TRUE.                                 23190007
232000                                                                  23200007
232100     IF WS-STATUS-2                                               23210007
232200     OR WS-STATUS-0                                               23220007
232300        PERFORM 6500-PREPARE-W90-RECORD                           23230007
232400        PERFORM 8300-SELECT-EXIST-KEY                             23240007
232500     END-IF.                                                      23250007
232600                                                                  23260007
232700     IF WS-KEY-EXIST-YES                                          23270007
232800        SET WS-INSERT                                             23280007
232900            WS-W92    TO TRUE                                     23290007
233000        PERFORM 8500-AUDIT-D86                                    23300007
233100        PERFORM 7400-PREPARE-W92-RECORD                           23310007
233200        PERFORM 7500-INSERT-W92-RECORD                            23320007
233300     ELSE                                                         23330007
233400        PERFORM 6400-INSERT-W90-W92                               23340007
233500     END-IF.                                                      23350007
233200                                                                  23320099
233201                                                                  23320199
233202 6000-STATUS-145-CORRECTED.                                       23320299
233210                                                                  23321099
233300     IF WS-CORRECTED-ACTION                                       23330099
233400     OR REPORTING-STATUS-ZERO-CORR-PRD OF WS-CURR-W92-REC         23340099
233500        SET WS-STATUS-2                                           23350099
233600            WS-INSERT                                             23360099
233700            WS-W92    TO TRUE                                     23370099
233800        MOVE MFA-1042S-RPT-ITEM-ID     OF WS-CURR-W92-REC         23380099
233900          TO MFA-1042S-RPT-ITEM-ID     OF MFS-W90-A999            23390099
234100        PERFORM 8500-AUDIT-D86                                    23410099
234200        PERFORM 7400-PREPARE-W92-RECORD                           23420099
234300        PERFORM 7500-INSERT-W92-RECORD                            23430099
234400     ELSE                                                         23440099
234500        IF WS-UPDATE-ACTION                                       23450099
234600           SET WS-UPDATE                                          23460099
234700               WS-W92 TO TRUE                                     23470099
234800           MOVE WS-CURR-W92-REC TO MFS-W92-A999                   23480099
234900           PERFORM 8500-AUDIT-D86                                 23490099
235000           PERFORM 6600-PREPARE-W92-NQI                           23500099
235100           PERFORM 7450-UPDATE-W92-NQI                            23510099
235200        END-IF                                                    23520099
235300     END-IF.                                                      23530099
235400                                                                  23540099
235500                                                                  23550099
235600 6100-STATUS-23-CORRECTED.                                        23560099
235700                                                                  23570099
235800     IF WS-CORRECTED-ACTION                                       23580099
235900     OR WS-UPDATE-ACTION                                          23590099
236000        PERFORM 7900-SELECT-PREV-STATUS                           23600099
236100        IF REPORTING-STATUS-NOT-CREATED   OF WS-CURR-W92-REC      23610099
236200           SET WS-STATUS-0                TO TRUE                 23620099
236300           MOVE WS-CURR-W92-REC           TO MFS-W92-A999         23630099
236400           PERFORM 7300-UPDATE-W92                                23640099
236500        ELSE                                                      23650099
236600           IF REPORTING-STATUS-PRODUCED      OF MFS-W92-A999 OR   23660099
236700              REPORTING-STATUS-CORR-PRODUCED OF MFS-W92-A999      23670099
236800              PERFORM 7950-CHECK-PREV-STATUS                      23680099
236900              IF WS-DELETE-ACTION-YES                             23690099
237000                 PERFORM 6700-DELETE-W92-PROCESS                  23700099
237100              ELSE                                                23710099
237200                 SET WS-STATUS-2             TO TRUE              23720099
237300                 MOVE WS-CURR-W92-REC        TO MFS-W92-A999      23730099
237400                 PERFORM 7300-UPDATE-W92                          23740099
237500              END-IF                                              23750099
237600           ELSE                                                   23760099
237700              SET WS-STATUS-2                TO TRUE              23770099
237800              MOVE WS-CURR-W92-REC           TO MFS-W92-A999      23780099
237900              PERFORM 7300-UPDATE-W92                             23790099
238000           END-IF                                                 23800099
238100        END-IF                                                    23810099
238200     END-IF.                                                      23820099
238300                                                                  23830099
238400                                                                  23840099
238500 6300-CHECK-CURR-WE341Y1-FILE.                                    23850099
238600                                                                  23860099
238700     IF WS-WE341Y1-EOF-NO                                         23870099
238800        IF WS-WE341Y1-TAX-YR-DT  = WS-CURR-WE341Y1-TAX-YR-DT AND  23880099
238900           WS-WE341Y1-FUND-CODE  = WS-CURR-WE341Y1-FUND-CODE AND  23890099
239000           WS-WE341Y1-ACCT-NO    = WS-CURR-WE341Y1-ACCT-NO        23900099
239100           IF WS-WE341Y1-ACCUM-TYPE = WS-CURR-WE341Y1-ACCUM-TYPE  23910099
239200              SET WS-WE341Y1-ACCM-CHANGE-NO  TO TRUE              23920099
239300           ELSE                                                   23930099
239400              SET WS-WE341Y1-ACCM-CHANGE-YES TO TRUE              23940099
239500              MOVE ACCUMULATION-TYPE-CD  OF 100-1042S-RPT-INFO-REC23950099
239600                TO WS-CURR-WE341Y1-ACCUM-TYPE                     23960099
239700           END-IF                                                 23970099
239800        ELSE                                                      23980099
239900           SET WS-WE341Y1-KEY-CHANGE-YES TO TRUE                  23990099
240000           MOVE TAX-YR-DT                OF 100-1042S-RPT-INFO-REC24000099
240100             TO WS-CURR-WE341Y1-TAX-YR-DT                         24010099
240200           MOVE FUND-CODE                OF 100-1042S-RPT-INFO-REC24020099
240300             TO WS-CURR-WE341Y1-FUND-CODE                         24030099
240400           MOVE ACCOUNT-NUMBER           OF 100-1042S-RPT-INFO-REC24040099
240500             TO WS-CURR-WE341Y1-ACCT-NO                           24050099
240600        END-IF                                                    24060099
240700     ELSE                                                         24070099
240800        SET WS-WE341Y1-KEY-CHANGE-YES    TO TRUE                  24080099
240900     END-IF.                                                      24090099
241000                                                                  24100099
241100                                                                  24110099
241200 6400-INSERT-W90-W92.                                             24120099
241300                                                                  24130099
241400     SET WS-W90                                                   24140099
241500         WS-INSERT TO TRUE.                                       24150099
241600                                                                  24160099
241700     PERFORM 8500-AUDIT-D86.                                      24170099
241800                                                                  24180099
241900     INITIALIZE MFS-W90-A999.                                     24190099
242000                                                                  24200099
242100     PERFORM 6500-PREPARE-W90-RECORD.                             24210099
242200     PERFORM 7800-INSERT-W90-RECORD.                              24220099
242300     PERFORM 7400-PREPARE-W92-RECORD.                             24230099
242400     PERFORM 7500-INSERT-W92-RECORD.                              24240099
242500                                                                  24250099
242600                                                                  24260099
242700 6500-PREPARE-W90-RECORD.                                         24270099
242800                                                                  24280099
242900     PERFORM 7150-SELECT-MAX-SEQ-NO.                              24290099
243000                                                                  24300099
239400     IF WS-SSN-CHANGE-YES                                         23940000
239500     OR WS-CHANGED-SSN-YES                                        23950000
239600        IF WS-STATUS-2                                            23960000
239700           PERFORM 6650-MOVE-SAVE-W90-STA3-TO-W90                 23970000
239800           PERFORM 6550-SELECT-PREV-UNIQUE-ID                     23980000
239900           IF WS-FOUND-PREV-UNIQUE-YES                            23990000
240000              CONTINUE                                            24000000
240100           ELSE                                                   24010000
240200              PERFORM 8200-GET-UNIQUE-FORM-ID                     24020000
240300              MOVE WS-NEXT-UNIQUE-FORM-ID                         24030000
240400                TO UNIQUE-FORM-ID      OF MFS-W90-A999            24040000
240500           END-IF                                                 24050000
240600        ELSE                                                      24060000
240700           PERFORM 6750-SELECT-W90-KEYS                           24070000
240800           IF WS-FOUND-W90-KEYS-YES                               24080000
240900              MOVE WS-SAVE-UNIQUE-FORM-ID                         24090000
241000                TO UNIQUE-FORM-ID      OF MFS-W90-A999            24100000
241100           ELSE                                                   24110000
241200              PERFORM 8200-GET-UNIQUE-FORM-ID                     24120000
241300              MOVE WS-NEXT-UNIQUE-FORM-ID                         24130000
241400                TO UNIQUE-FORM-ID      OF MFS-W90-A999            24140000
241500           END-IF                                                 24150000
241600        END-IF                                                    24160000
241700     ELSE                                                         24170000
241800        PERFORM 6750-SELECT-W90-KEYS                              24180000
241900        IF WS-FOUND-W90-KEYS-YES                                  24190000
241910              MOVE WS-SAVE-UNIQUE-FORM-ID                         24191000
241911                TO UNIQUE-FORM-ID      OF MFS-W90-A999            24191100
241912        ELSE                                                      24191200
241913           PERFORM 8200-GET-UNIQUE-FORM-ID                        24191300
241914           MOVE WS-NEXT-UNIQUE-FORM-ID                            24191400
241915             TO UNIQUE-FORM-ID         OF MFS-W90-A999            24191500
241916        END-IF                                                    24191600
241917     END-IF.                                                      24191700
241918                                                                  24191800
241919     PERFORM 6520-MOVE-WRKE341-TO-W90.                            24191900
241920                                                                  24192000
241921                                                                  24192100
241922 6520-MOVE-WRKE341-TO-W90.                                        24192200
241923                                                                  24192300
243100     MOVE FUND-CODE                    OF 100-1042S-RPT-INFO-REC  24310099
243200       TO FUND-CODE                    OF MFS-W90-A999.           24320099
243300     MOVE ACCOUNT-NUMBER               OF 100-1042S-RPT-INFO-REC  24330099
243400       TO ACCOUNT-NUMBER               OF MFS-W90-A999.           24340099
243500     MOVE TAX-YR-DT                    OF 100-1042S-RPT-INFO-REC  24350099
243600       TO TAX-YR-DT                    OF MFS-W90-A999.           24360099
243700     MOVE ACCUMULATION-TYPE-CD         OF 100-1042S-RPT-INFO-REC  24370099
243800       TO ACCUMULATION-TYPE-CD         OF MFS-W90-A999.           24380099
243900     MOVE WS-B27935                                               24390099
244000       TO LAST-MNT-OPID                OF MFS-W90-A999.           24400099
244100     MOVE PARM-TIMESTAMP               OF PSR0622                 24410099
244200       TO LAST-MNT-DATE-TIME           OF MFS-W90-A999.           24420099
244300     MOVE TAX-RSP-ST-CNY-CD            OF 100-1042S-RPT-INFO-REC  24430099
244400       TO TAX-RSP-ST-CNY-CD            OF MFS-W90-A999.           24440099
244500     MOVE INCOME-TYPE-CD               OF 100-1042S-RPT-INFO-REC  24450099
244600       TO INCOME-TYPE-CD               OF MFS-W90-A999.           24460099
244700     MOVE TAX-RSP-TAX-ID               OF 100-1042S-RPT-INFO-REC  24470099
244800       TO TAX-RSP-TAX-ID               OF MFS-W90-A999.           24480099
244900      SET TAX-RSP-TAX-ID-NN            OF MFS-W90-A999 TO TRUE.   24490099
245000     MOVE CH3-TAX-RT                   OF 100-1042S-RPT-INFO-REC  24500099
245100       TO CH3-TAX-RT                   OF MFS-W90-A999.           24510099
245200     MOVE CH4-TAX-RT                   OF 100-1042S-RPT-INFO-REC  24520099
245300       TO CH4-TAX-RT                   OF MFS-W90-A999.           24530099
245400     MOVE CH3-WITHHOLDING-CD           OF 100-1042S-RPT-INFO-REC  24540099
245500       TO CH3-WITHHOLDING-CD           OF MFS-W90-A999.           24550099
245600     MOVE CH4-WITHHOLDING-CD           OF 100-1042S-RPT-INFO-REC  24560099
245700       TO CH4-WITHHOLDING-CD           OF MFS-W90-A999.           24570099
245800     MOVE CH3-EXEMPTION-CD             OF 100-1042S-RPT-INFO-REC  24580099
245900       TO CH3-EXEMPTION-CD             OF MFS-W90-A999.           24590099
246000      SET CH3-EXEMPTION-CD-NN          OF MFS-W90-A999 TO TRUE.   24600099
246100     MOVE CH4-EXEMPTION-CD             OF 100-1042S-RPT-INFO-REC  24610099
246200       TO CH4-EXEMPTION-CD             OF MFS-W90-A999.           24620099
246300      SET CH4-EXEMPTION-CD-NN          OF MFS-W90-A999 TO TRUE.   24630099
246400                                                                  24640099
246500     MOVE TAX-RSP-CH3-STA-CODE-TYP-ID  OF 100-1042S-RPT-INFO-REC  24650099
246600       TO TAX-RSP-CH3-STA-CODE-TYP-ID  OF MFS-W90-A999.           24660099
246700     IF TAX-RSP-CH3-STA-CODE-TYP-ID    OF 100-1042S-RPT-INFO-REC  24670099
246800                                       = ZERO                     24680099
246900        SET TAX-RSP-CH3-STA-CODE-TYP-ID-NY OF MFS-W90-A999 TO TRUE24690099
247000     ELSE                                                         24700099
247100        SET TAX-RSP-CH3-STA-CODE-TYP-ID-NN OF MFS-W90-A999 TO TRUE24710099
247200     END-IF.                                                      24720099
247300                                                                  24730099
247400     MOVE TAX-RSP-CH3-STA-CODE-ID      OF 100-1042S-RPT-INFO-REC  24740099
247500       TO TAX-RSP-CH3-STA-CODE-ID      OF MFS-W90-A999.           24750099
247600     IF TAX-RSP-CH3-STA-CODE-ID        OF 100-1042S-RPT-INFO-REC  24760099
247700                                       = SPACE                    24770099
247800        SET TAX-RSP-CH3-STA-CODE-ID-NY OF MFS-W90-A999 TO TRUE    24780099
247900     ELSE                                                         24790099
248000        SET TAX-RSP-CH3-STA-CODE-ID-NN OF MFS-W90-A999 TO TRUE    24800099
248100     END-IF.                                                      24810099
248200                                                                  24820099
248300     MOVE TAX-RSP-CH4-STA-CODE-TYP-ID  OF 100-1042S-RPT-INFO-REC  24830099
248400       TO TAX-RSP-CH4-STA-CODE-TYP-ID  OF MFS-W90-A999.           24840099
248500     IF TAX-RSP-CH4-STA-CODE-TYP-ID    OF 100-1042S-RPT-INFO-REC  24850099
248600                                       = ZERO                     24860099
248700        SET TAX-RSP-CH4-STA-CODE-TYP-ID-NY OF MFS-W90-A999 TO TRUE24870099
248800     ELSE                                                         24880099
248900        SET TAX-RSP-CH4-STA-CODE-TYP-ID-NN OF MFS-W90-A999 TO TRUE24890099
249000     END-IF.                                                      24900099
249100                                                                  24910099
249200     MOVE TAX-RSP-CH4-STA-CODE-ID      OF 100-1042S-RPT-INFO-REC  24920099
249300       TO TAX-RSP-CH4-STA-CODE-ID      OF MFS-W90-A999.           24930099
249400     IF TAX-RSP-CH4-STA-CODE-ID        OF 100-1042S-RPT-INFO-REC  24940099
249500                                       = SPACE                    24950099
249600        SET TAX-RSP-CH4-STA-CODE-ID-NY OF MFS-W90-A999 TO TRUE    24960099
249700     ELSE                                                         24970099
249800        SET TAX-RSP-CH4-STA-CODE-ID-NN OF MFS-W90-A999 TO TRUE    24980099
249900     END-IF.                                                      24990099
250000                                                                  25000099
250100     MOVE LMT-ON-BEN-CD                OF 100-1042S-RPT-INFO-REC  25010099
250200       TO LMT-ON-BEN-CD                OF MFS-W90-A999.           25020099
250300     IF LMT-ON-BEN-CD                  OF 100-1042S-RPT-INFO-REC  25030099
250400                                       = SPACE                    25040099
250500        SET LMT-ON-BEN-CD-NY           OF MFS-W90-A999 TO TRUE    25050099
250600     ELSE                                                         25060099
250700        SET LMT-ON-BEN-CD-NN           OF MFS-W90-A999 TO TRUE    25070099
250800     END-IF.                                                      25080099
250900                                                                  25090099
254000                                                                  25400099
254100 6550-SELECT-PREV-UNIQUE-ID.                                      25410099
254200                                                                  25420099
255200     EXEC SQL                                                     25520099
255300       SELECT                                                     25530099
255400             W90.UNIQUE_FORM_ID                                   25540099
255500       INTO                                                       25550099
255600             :MFS-W90-A999.UNIQUE-FORM-ID                         25560099
255700       FROM W90_A999        AS W90                                25570099
255800       INNER JOIN                                                 25580099
255900            W92_A999        AS W92                                25590099
256000          ON  W90.ACCOUNT_NUMBER                                  25600099
256100            = W92.ACCOUNT_NUMBER                                  25610099
256200          AND W90.ACCUMULATION_TYPE_CD                            25620099
256300            = W92.ACCUMULATION_TYPE_CD                            25630099
256400          AND W90.FUND_CODE                                       25640099
256500            = W92.FUND_CODE                                       25650099
256600          AND W90.MFA_1042S_RPT_ITEM_ID                           25660099
256700            = W92.MFA_1042S_RPT_ITEM_ID                           25670099
256800          AND W90.TAX_YR_DT                                       25680099
256900            = W92.TAX_YR_DT                                       25690099
250700        WHERE W90.FUND_CODE                                       25070000
250800              = :MFS-W90-A999.FUND-CODE                           25080000
250900          AND W90.ACCOUNT_NUMBER                                  25090000
251000              = :MFS-W90-A999.ACCOUNT-NUMBER                      25100000
251100          AND W90.TAX_YR_DT                                       25110000
251200              = :MFS-W90-A999.TAX-YR-DT                           25120000
251300          AND  W90.TAX_RSP_ST_CNY_CD                              25130000
251400               = :MFS-W90-A999.TAX-RSP-ST-CNY-CD                  25140000
251500          AND  W90.INCOME_TYPE_CD                                 25150000
251600               = :MFS-W90-A999.INCOME-TYPE-CD                     25160000
251700          AND  W90.CH3_TAX_RT                                     25170000
251800               = :MFS-W90-A999.CH3-TAX-RT                         25180000
251900          AND  W90.CH4_TAX_RT                                     25190000
252000               = :MFS-W90-A999.CH4-TAX-RT                         25200000
252100          AND  W90.CH3_WITHHOLDING_CD                             25210000
252200               = :MFS-W90-A999.CH3-WITHHOLDING-CD                 25220000
252300          AND  W90.CH4_WITHHOLDING_CD                             25230000
252400               = :MFS-W90-A999.CH4-WITHHOLDING-CD                 25240000
252500          AND  W90.CH3_EXEMPTION_CD                               25250000
252600               IS NOT DISTINCT FROM                               25260000
252700                 :MFS-W90-A999.CH3-EXEMPTION-CD                   25270000
252800                  INDICATOR                                       25280000
252900                 :MFS-W90-A999.CH3-EXEMPTION-CD-NC                25290000
253000          AND  W90.CH4_EXEMPTION_CD                               25300000
253100               IS NOT DISTINCT FROM                               25310000
253200                 :MFS-W90-A999.CH4-EXEMPTION-CD                   25320000
253300                  INDICATOR                                       25330000
253400                 :MFS-W90-A999.CH4-EXEMPTION-CD-NC                25340000
253500          AND  W90.TAX_RSP_CH3_STA_CODE_TYP_ID                    25350000
253600               IS NOT DISTINCT FROM                               25360000
253700                 :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-TYP-ID        25370000
253800                  INDICATOR                                       25380000
253900                 :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-TYP-ID-NC     25390000
254000          AND  W90.TAX_RSP_CH3_STA_CODE_ID                        25400000
254100               IS NOT DISTINCT FROM                               25410000
254200                 :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-ID            25420000
254300                  INDICATOR                                       25430000
254400                 :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-ID-NC         25440000
254500          AND  W90.TAX_RSP_CH4_STA_CODE_TYP_ID                    25450000
254600               IS NOT DISTINCT FROM                               25460000
254700                 :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-TYP-ID        25470000
254800                  INDICATOR                                       25480000
254900                 :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-TYP-ID-NC     25490000
255000          AND  W90.TAX_RSP_CH4_STA_CODE_ID                        25500000
255100               IS NOT DISTINCT FROM                               25510000
255200                 :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-ID            25520000
255300                  INDICATOR                                       25530000
255400                 :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-ID-NC         25540000
255500          AND  W90.LMT_ON_BEN_CD                                  25550000
255600               IS NOT DISTINCT FROM                               25560000
255700                 :MFS-W90-A999.LMT-ON-BEN-CD                      25570000
255800                  INDICATOR                                       25580000
255900                 :MFS-W90-A999.LMT-ON-BEN-CD-NC                   25590000
257800         AND W92.REPORTING_STATUS_CD IN ('1','4','5')             25780099
257900        ORDER BY W90.LAST_MNT_DATE_TIME DESC                      25790099
258000        FETCH FIRST 1 ROW ONLY                                    25800099
258100     END-EXEC.                                                    25810099
258200                                                                  25820099
258300     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE    OF WS00575.          25830099
258400                                                                  25840099
258500     EVALUATE TRUE                                                25850099
258600         WHEN SQL-RETURN-SUCCESSFUL          OF WS00575           25860099
258700              SET WS-FOUND-PREV-UNIQUE-YES                        25870099
258800               TO TRUE                                            25880099
258900         WHEN SQL-RETURN-NOT-FOUND           OF WS00575           25890099
259000              SET WS-FOUND-PREV-UNIQUE-NO                         25900099
259100               TO TRUE                                            25910099
259200         WHEN OTHER                                               25920099
259300              DISPLAY '************ B27935 ABENDING ************' 25930099
259400                 UPON CONSOLE                                     25940099
259500              DISPLAY '* PARAGRAPH : 6550-SELECT-PREV-UNIQUE-ID*' 25950099
259600                 UPON CONSOLE                                     25960099
259700              DISPLAY '* UNSUCCESSFUL SELECT W90 TABLE         *' 25970099
259800                 UPON CONSOLE                                     25980099
259900              DISPLAY '* RETURN CODE    : '                       25990099
260000                      SQLSTATE-RETURN-CDE    OF WS00575           26000099
260100                 UPON CONSOLE                                     26010099
260200              DISPLAY '* FUND CODE      : '                       26020099
260300                      FUND-CODE              OF MFS-W90-A999      26030099
260400                 UPON CONSOLE                                     26040099
260500              DISPLAY '* ACCOUNT NUMBER : '                       26050099
260600                      ACCOUNT-NUMBER         OF MFS-W90-A999      26060099
260700                 UPON CONSOLE                                     26070099
260800              DISPLAY '* TAX YEAR       : '                       26080099
260900                      TAX-YR-DT              OF MFS-W90-A999      26090099
261000                 UPON CONSOLE                                     26100099
261100              DISPLAY '* ACCUMULATION CD:'                        26110099
261200                      ACCUMULATION-TYPE-CD   OF MFS-W90-A999      26120099
261300                 UPON CONSOLE                                     26130099
261400              DISPLAY '*****************************************' 26140099
261500                 UPON CONSOLE                                     26150099
261600              CALL SR0002                                         26160099
261700     END-EVALUATE.                                                26170099
261800                                                                  26180099
261900 6600-PREPARE-W92-NQI.                                            26190099
262000                                                                  26200099
262100     SET WS-UPDATE                                                26210099
262200         WS-W92 TO TRUE.                                          26220099
262300     PERFORM 8500-AUDIT-D86.                                      26230099
262400                                                                  26240099
262500     MOVE WS-JOB-ID                                               26250099
262600       TO ADD-JOB-ID                    OF MFS-W92-A999.          26260099
262700     MOVE PARM-TIMESTAMP                OF PSR0622                26270099
262800       TO LAST-MNT-DATE-TIME            OF MFS-W92-A999.          26280099
262900     MOVE WS-B27935                                               26290099
263000       TO LAST-MNT-OPID                 OF MFS-W92-A999.          26300099
263100     MOVE WS-CURRENT-DATE                                         26310099
263200       TO REPORTING-STATUS-DT           OF MFS-W92-A999 .         26320099
263300     MOVE NQI-EIN-ID                    OF 100-1042S-RPT-INFO-REC 26330099
263400       TO NQI-EIN-ID                    OF MFS-W92-A999.          26340099
263500     MOVE NQI-GIIN-EXTERNAL-ID          OF 100-1042S-RPT-INFO-REC 26350099
263600       TO NQI-GIIN-EXTERNAL-ID          OF MFS-W92-A999.          26360099
263700                                                                  26370099
263800     IF NQI-GIIN-EXTERNAL-ID            OF 100-1042S-RPT-INFO-REC 26380099
263900                                        = SPACE                   26390099
264000        SET NQI-GIIN-EXTERNAL-ID-NY     OF MFS-W92-A999 TO TRUE   26400099
264100     ELSE                                                         26410099
264200        SET NQI-GIIN-EXTERNAL-ID-NN     OF MFS-W92-A999 TO TRUE   26420099
264300     END-IF.                                                      26430099
264400                                                                  26440099
264500     MOVE NQI-STATE-COUNTRY-CD          OF 100-1042S-RPT-INFO-REC 26450099
264600       TO NQI-STATE-COUNTRY-CD          OF MFS-W92-A999.          26460099
264700     IF NQI-STATE-COUNTRY-CD            OF 100-1042S-RPT-INFO-REC 26470099
264800                                        = ZERO                    26480099
264900        SET NQI-STATE-COUNTRY-CD-NY     OF MFS-W92-A999  TO TRUE  26490099
265000     ELSE                                                         26500099
265100        SET NQI-STATE-COUNTRY-CD-NN     OF MFS-W92-A999  TO TRUE  26510099
265200     END-IF.                                                      26520099
265300                                                                  26530099
265400     MOVE NQI-FOREIGN-TAX-ID            OF 100-1042S-RPT-INFO-REC 26540099
265500       TO NQI-FOREIGN-TAX-ID            OF MFS-W92-A999.          26550099
265600                                                                  26560099
265700     MOVE NQI-CH3-STA-CODE-TYPE-ID      OF 100-1042S-RPT-INFO-REC 26570099
265800       TO NQI-CH3-STA-CODE-TYPE-ID      OF MFS-W92-A999.          26580099
265900     IF NQI-CH3-STA-CODE-TYPE-ID        OF 100-1042S-RPT-INFO-REC 26590099
266000                                        = ZERO                    26600099
266100        SET NQI-CH3-STA-CODE-TYPE-ID-NY OF MFS-W92-A999 TO TRUE   26610099
266200     ELSE                                                         26620099
266300        SET NQI-CH3-STA-CODE-TYPE-ID-NN OF MFS-W92-A999 TO TRUE   26630099
266400     END-IF.                                                      26640099
266500                                                                  26650099
266600     MOVE NQI-CH3-STA-CODE-ID           OF 100-1042S-RPT-INFO-REC 26660099
266700       TO NQI-CH3-STA-CODE-ID           OF MFS-W92-A999.          26670099
266800     IF NQI-CH3-STA-CODE-ID             OF 100-1042S-RPT-INFO-REC 26680099
266900                                        = SPACE                   26690099
267000        SET NQI-CH3-STA-CODE-ID-NY      OF MFS-W92-A999 TO TRUE   26700099
267100     ELSE                                                         26710099
267200        SET NQI-CH3-STA-CODE-ID-NN      OF MFS-W92-A999 TO TRUE   26720099
267300     END-IF.                                                      26730099
267400                                                                  26740099
267500     MOVE NQI-CH4-STA-CODE-TYPE-ID      OF 100-1042S-RPT-INFO-REC 26750099
267600       TO NQI-CH4-STA-CODE-TYPE-ID      OF MFS-W92-A999.          26760099
267700     IF NQI-CH4-STA-CODE-TYPE-ID        OF 100-1042S-RPT-INFO-REC 26770099
267800                                        = ZERO                    26780099
267900        SET NQI-CH4-STA-CODE-TYPE-ID-NY OF MFS-W92-A999 TO TRUE   26790099
268000     ELSE                                                         26800099
268100        SET NQI-CH4-STA-CODE-TYPE-ID-NN OF MFS-W92-A999 TO TRUE   26810099
268200     END-IF.                                                      26820099
268300                                                                  26830099
268400     MOVE NQI-CH4-STA-CODE-ID           OF 100-1042S-RPT-INFO-REC 26840099
268500       TO NQI-CH4-STA-CODE-ID           OF MFS-W92-A999.          26850099
268600     IF NQI-CH4-STA-CODE-ID             OF 100-1042S-RPT-INFO-REC 26860099
268700                                        = SPACE                   26870099
268800        SET NQI-CH4-STA-CODE-ID-NY      OF MFS-W92-A999 TO TRUE   26880099
268900     ELSE                                                         26890099
269000        SET NQI-CH4-STA-CODE-ID-NN      OF MFS-W92-A999 TO TRUE   26900099
267300     END-IF.                                                      26730000
267400                                                                  26740000
267500                                                                  26750000
267600 6650-MOVE-SAVE-W90-STA3-TO-W90.                                  26760000
267700                                                                  26770000
267800     MOVE FUND-CODE                   OF WS-SAVE-W90-STATUS-3     26780000
267900       TO FUND-CODE                   OF MFS-W90-A999.            26790000
268000     MOVE ACCOUNT-NUMBER              OF WS-SAVE-W90-STATUS-3     26800000
268100       TO ACCOUNT-NUMBER              OF MFS-W90-A999.            26810000
268200     MOVE TAX-YR-DT                   OF WS-SAVE-W90-STATUS-3     26820000
268300       TO TAX-YR-DT                   OF MFS-W90-A999.            26830000
268400     MOVE ACCUMULATION-TYPE-CD        OF WS-SAVE-W90-STATUS-3     26840000
268500       TO ACCUMULATION-TYPE-CD        OF MFS-W90-A999.            26850000
268510     MOVE TAX-RSP-ST-CNY-CD           OF WS-SAVE-W90-STATUS-3     26851000
268520       TO TAX-RSP-ST-CNY-CD           OF MFS-W90-A999.            26852000
268530     MOVE INCOME-TYPE-CD              OF WS-SAVE-W90-STATUS-3     26853000
268540       TO INCOME-TYPE-CD              OF MFS-W90-A999.            26854000
268550     MOVE CH3-TAX-RT                  OF WS-SAVE-W90-STATUS-3     26855000
268560       TO CH3-TAX-RT                  OF MFS-W90-A999.            26856000
268570     MOVE CH4-TAX-RT                  OF WS-SAVE-W90-STATUS-3     26857000
268580       TO CH4-TAX-RT                  OF MFS-W90-A999.            26858000
268590     MOVE CH3-WITHHOLDING-CD          OF WS-SAVE-W90-STATUS-3     26859000
268600       TO CH3-WITHHOLDING-CD          OF MFS-W90-A999.            26860000
268601     MOVE CH4-WITHHOLDING-CD          OF WS-SAVE-W90-STATUS-3     26860100
268602       TO CH4-WITHHOLDING-CD          OF MFS-W90-A999.            26860200
268603                                                                  26860300
268604     IF CH3-EXEMPTION-CD              OF WS-SAVE-W90-STATUS-3     26860400
268605      > SPACES                                                    26860500
268606        SET CH3-EXEMPTION-CD-NN       OF MFS-W90-A999             26860600
268607         TO TRUE                                                  26860700
268608        MOVE CH3-EXEMPTION-CD         OF WS-SAVE-W90-STATUS-3     26860800
268609          TO CH3-EXEMPTION-CD         OF MFS-W90-A999             26860900
268610     ELSE                                                         26861000
268611        SET CH3-EXEMPTION-CD-NY       OF MFS-W90-A999             26861100
268612         TO TRUE                                                  26861200
268613     END-IF.                                                      26861300
268614                                                                  26861400
268615     IF CH4-EXEMPTION-CD              OF WS-SAVE-W90-STATUS-3     26861500
268616      > SPACES                                                    26861600
268617         SET CH4-EXEMPTION-CD-NN      OF MFS-W90-A999             26861700
268618          TO TRUE                                                 26861800
268619        MOVE CH4-EXEMPTION-CD         OF WS-SAVE-W90-STATUS-3     26861900
268620          TO CH4-EXEMPTION-CD         OF MFS-W90-A999             26862000
268621     ELSE                                                         26862100
268622         SET CH4-EXEMPTION-CD-NY      OF MFS-W90-A999             26862200
268623          TO TRUE                                                 26862300
268624     END-IF.                                                      26862400
268625                                                                  26862500
268626     IF TAX-RSP-CH3-STA-CODE-TYP-ID   OF WS-SAVE-W90-STATUS-3     26862600
268627     IS NUMERIC                                                   26862700
268628     AND TAX-RSP-CH3-STA-CODE-TYP-ID  OF WS-SAVE-W90-STATUS-3     26862800
268629       > +0                                                       26862900
268630         SET TAX-RSP-CH3-STA-CODE-TYP-ID-NN                       26863000
268631                                      OF MFS-W90-A999             26863100
268632          TO TRUE                                                 26863200
268633         MOVE TAX-RSP-CH3-STA-CODE-TYP-ID                         26863300
268634                                      OF WS-SAVE-W90-STATUS-3     26863400
268635          TO TAX-RSP-CH3-STA-CODE-TYP-ID                          26863500
268636                                      OF MFS-W90-A999             26863600
268637     ELSE                                                         26863700
268638         SET TAX-RSP-CH3-STA-CODE-TYP-ID-NY                       26863800
268639                                      OF MFS-W90-A999             26863900
268640          TO TRUE                                                 26864000
268641     END-IF.                                                      26864100
268642                                                                  26864200
268643     IF TAX-RSP-CH3-STA-CODE-ID         OF WS-SAVE-W90-STATUS-3   26864300
268644      > SPACES                                                    26864400
268645         SET TAX-RSP-CH3-STA-CODE-ID-NN OF MFS-W90-A999           26864500
268646          TO TRUE                                                 26864600
268647        MOVE TAX-RSP-CH3-STA-CODE-ID    OF WS-SAVE-W90-STATUS-3   26864700
268648          TO TAX-RSP-CH3-STA-CODE-ID    OF MFS-W90-A999           26864800
268649     ELSE                                                         26864900
268650         SET TAX-RSP-CH3-STA-CODE-ID-NY OF MFS-W90-A999           26865000
268651          TO TRUE                                                 26865100
268652     END-IF.                                                      26865200
268653                                                                  26865300
268654     IF TAX-RSP-CH4-STA-CODE-TYP-ID     OF WS-SAVE-W90-STATUS-3   26865400
268655     IS NUMERIC                                                   26865500
268656     AND  TAX-RSP-CH4-STA-CODE-TYP-ID   OF WS-SAVE-W90-STATUS-3   26865600
268657       > +0                                                       26865700
268658         SET TAX-RSP-CH4-STA-CODE-TYP-ID-NN                       26865800
268659                                        OF MFS-W90-A999           26865900
268660          TO TRUE                                                 26866000
268661         MOVE TAX-RSP-CH4-STA-CODE-TYP-ID                         26866100
268662                                        OF WS-SAVE-W90-STATUS-3   26866200
268663          TO TAX-RSP-CH4-STA-CODE-TYP-ID                          26866300
268664                                        OF MFS-W90-A999           26866400
268665     ELSE                                                         26866500
268666         SET TAX-RSP-CH4-STA-CODE-TYP-ID-NY                       26866600
268667                                        OF MFS-W90-A999           26866700
268668          TO TRUE                                                 26866800
268669     END-IF.                                                      26866900
268670                                                                  26867000
268671     IF TAX-RSP-CH4-STA-CODE-ID         OF WS-SAVE-W90-STATUS-3   26867100
268672      > SPACES                                                    26867200
268673         SET TAX-RSP-CH4-STA-CODE-ID-NN OF MFS-W90-A999           26867300
268674          TO TRUE                                                 26867400
268675        MOVE TAX-RSP-CH4-STA-CODE-ID    OF WS-SAVE-W90-STATUS-3   26867500
268676          TO TAX-RSP-CH4-STA-CODE-ID    OF MFS-W90-A999           26867600
268677     ELSE                                                         26867700
268678         SET TAX-RSP-CH4-STA-CODE-ID-NY OF MFS-W90-A999           26867800
268679          TO TRUE                                                 26867900
268680     END-IF.                                                      26868000
268681                                                                  26868100
268682     IF LMT-ON-BEN-CD                 OF WS-SAVE-W90-STATUS-3     26868200
268683      > SPACES                                                    26868300
268684         SET LMT-ON-BEN-CD-NN         OF MFS-W90-A999             26868400
268685          TO TRUE                                                 26868500
268686        MOVE LMT-ON-BEN-CD            OF WS-SAVE-W90-STATUS-3     26868600
268687          TO LMT-ON-BEN-CD            OF MFS-W90-A999             26868700
268688     ELSE                                                         26868800
268689         SET LMT-ON-BEN-CD-NY         OF MFS-W90-A999             26868900
268690          TO TRUE                                                 26869000
269100     END-IF.                                                      26910099
269200                                                                  26920099
269300                                                                  26930099
269400 6700-DELETE-W92-PROCESS.                                         26940099
269500                                                                  26950099
269600     INITIALIZE WS-DEL-W92-REC.                                   26960099
269700                                                                  26970099
269800     SET WS-DELETE                                                26980099
269900         WS-W92    TO TRUE.                                       26990099
270000     MOVE WS-CURR-W92-REC TO WS-DEL-W92-REC                       27000099
270100                             MFS-W92-A999.                        27010099
270200     PERFORM 8500-AUDIT-D86.                                      27020099
270300     PERFORM 7200-DELETE-W92.                                     27030099
270400                                                                  27040099
272110 6750-SELECT-W90-KEYS.                                            27211000
270500                                                                  27050099
272130     PERFORM 6850-MOVE-INPUT-TO-W90.                              27213000
272140                                                                  27214000
272150     EXEC SQL                                                     27215000
272160       SELECT                                                     27216000
272170             W90.UNIQUE_FORM_ID                                   27217000
272180       INTO                                                       27218000
272190             :MFS-W90-A999.UNIQUE-FORM-ID                         27219000
272191       FROM W90_A999        AS W90                                27219100
272192        WHERE W90.FUND_CODE                                       27219200
272193              = :MFS-W90-A999.FUND-CODE                           27219300
272194          AND W90.ACCOUNT_NUMBER                                  27219400
272195              = :MFS-W90-A999.ACCOUNT-NUMBER                      27219500
272196          AND W90.TAX_YR_DT                                       27219600
272197              = :MFS-W90-A999.TAX-YR-DT                           27219700
272198          AND  W90.TAX_RSP_ST_CNY_CD                              27219800
272199               = :MFS-W90-A999.TAX-RSP-ST-CNY-CD                  27219900
272200          AND  W90.INCOME_TYPE_CD                                 27220000
272201               = :MFS-W90-A999.INCOME-TYPE-CD                     27220100
272202          AND  W90.TAX_RSP_TAX_ID                                 27220200
272203               IS NOT DISTINCT FROM                               27220300
272204                 :MFS-W90-A999.TAX-RSP-TAX-ID                     27220400
272205                  INDICATOR                                       27220500
272206                 :MFS-W90-A999.TAX-RSP-TAX-ID-NC                  27220600
272207          AND  W90.CH3_TAX_RT                                     27220700
272208               = :MFS-W90-A999.CH3-TAX-RT                         27220800
272209          AND  W90.CH4_TAX_RT                                     27220900
272210               = :MFS-W90-A999.CH4-TAX-RT                         27221000
272211          AND  W90.CH3_WITHHOLDING_CD                             27221100
272212               = :MFS-W90-A999.CH3-WITHHOLDING-CD                 27221200
272213          AND  W90.CH4_WITHHOLDING_CD                             27221300
272214               = :MFS-W90-A999.CH4-WITHHOLDING-CD                 27221400
272215          AND  W90.CH3_EXEMPTION_CD                               27221500
272216               IS NOT DISTINCT FROM                               27221600
272217                 :MFS-W90-A999.CH3-EXEMPTION-CD                   27221700
272218                  INDICATOR                                       27221800
272219                 :MFS-W90-A999.CH3-EXEMPTION-CD-NC                27221900
272220          AND  W90.CH4_EXEMPTION_CD                               27222000
272221               IS NOT DISTINCT FROM                               27222100
272222                 :MFS-W90-A999.CH4-EXEMPTION-CD                   27222200
272223                  INDICATOR                                       27222300
272224                 :MFS-W90-A999.CH4-EXEMPTION-CD-NC                27222400
272225          AND  W90.TAX_RSP_CH3_STA_CODE_TYP_ID                    27222500
272226               IS NOT DISTINCT FROM                               27222600
272227                 :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-TYP-ID        27222700
272228                  INDICATOR                                       27222800
272229                 :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-TYP-ID-NC     27222900
272230          AND  W90.TAX_RSP_CH3_STA_CODE_ID                        27223000
272231               IS NOT DISTINCT FROM                               27223100
272232                 :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-ID            27223200
272233                  INDICATOR                                       27223300
272234                 :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-ID-NC         27223400
272235          AND  W90.TAX_RSP_CH4_STA_CODE_TYP_ID                    27223500
272236               IS NOT DISTINCT FROM                               27223600
272237                 :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-TYP-ID        27223700
272238                  INDICATOR                                       27223800
272239                 :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-TYP-ID-NC     27223900
272240          AND  W90.TAX_RSP_CH4_STA_CODE_ID                        27224000
272241               IS NOT DISTINCT FROM                               27224100
272242                 :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-ID            27224200
272243                  INDICATOR                                       27224300
272244                 :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-ID-NC         27224400
272245          AND  W90.LMT_ON_BEN_CD                                  27224500
272246               IS NOT DISTINCT FROM                               27224600
272247                 :MFS-W90-A999.LMT-ON-BEN-CD                      27224700
272248                  INDICATOR                                       27224800
272249                 :MFS-W90-A999.LMT-ON-BEN-CD-NC                   27224900
272250        ORDER BY W90.LAST_MNT_DATE_TIME DESC                      27225000
272251        FETCH FIRST 1 ROW ONLY                                    27225100
272252     END-EXEC.                                                    27225200
272253                                                                  27225300
272254     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE    OF WS00575.          27225400
272255                                                                  27225500
272256     EVALUATE TRUE                                                27225600
272257         WHEN SQL-RETURN-SUCCESSFUL          OF WS00575           27225700
272258              SET WS-FOUND-W90-KEYS-YES                           27225800
272259               TO TRUE                                            27225900
272260              MOVE UNIQUE-FORM-ID OF MFS-W90-A999                 27226000
272261                TO WS-SAVE-UNIQUE-FORM-ID                         27226100
272262         WHEN SQL-RETURN-NOT-FOUND           OF WS00575           27226200
272263              SET WS-FOUND-W90-KEYS-NO                            27226300
272264               TO TRUE                                            27226400
272265         WHEN OTHER                                               27226500
272266              DISPLAY '************ B27935 ABENDING ************' 27226600
272267                 UPON CONSOLE                                     27226700
272268              DISPLAY '* PARAGRAPH : 6750-SELECT-W90-KEYS      *' 27226800
272269                 UPON CONSOLE                                     27226900
272270              DISPLAY '* UNSUCCESSFUL SELECT W90 TABLE         *' 27227000
272271                 UPON CONSOLE                                     27227100
272272              DISPLAY '* RETURN CODE    : '                       27227200
272273                      SQLSTATE-RETURN-CDE    OF WS00575           27227300
272274                 UPON CONSOLE                                     27227400
272275              DISPLAY '* FUND CODE      : '                       27227500
272276                      FUND-CODE              OF MFS-W90-A999      27227600
272277                 UPON CONSOLE                                     27227700
272278              DISPLAY '* ACCOUNT NUMBER : '                       27227800
272279                      ACCOUNT-NUMBER         OF MFS-W90-A999      27227900
272280                 UPON CONSOLE                                     27228000
272281              DISPLAY '* TAX YEAR       : '                       27228100
272282                      TAX-YR-DT              OF MFS-W90-A999      27228200
272283                 UPON CONSOLE                                     27228300
272284              DISPLAY '*****************************************' 27228400
272285                 UPON CONSOLE                                     27228500
272286              CALL SR0002                                         27228600
272287     END-EVALUATE.                                                27228700
272288                                                                  27228800
272290                                                                  27229000
270600 6800-DELETE-W90-PROCESS.                                         27060099
270700                                                                  27070099
270800     INITIALIZE WS-DEL-W90-REC.                                   27080099
270900                                                                  27090099
271000     PERFORM 7250-SELECT-EXIST-W92-CHILD.                         27100099
271100                                                                  27110099
271200     IF WS-W92-CHILD-EXIST-NO                                     27120099
271300        SET WS-DELETE                                             27130099
271400            WS-W90    TO TRUE                                     27140099
271500        MOVE WS-CURR-W90-REC TO WS-DEL-W90-REC                    27150099
271600                                MFS-W90-A999                      27160099
271700        PERFORM 8500-AUDIT-D86                                    27170099
271800        PERFORM 7550-DELETE-W90                                   27180099
273600     END-IF.                                                      27360000
273700                                                                  27370000
273710 6850-MOVE-INPUT-TO-W90.                                          27371000
273720                                                                  27372000
273730     MOVE FUND-CODE                   OF 100-1042S-RPT-INFO-REC   27373000
273740       TO FUND-CODE                   OF MFS-W90-A999.            27374000
273750     MOVE ACCOUNT-NUMBER              OF 100-1042S-RPT-INFO-REC   27375000
273760       TO ACCOUNT-NUMBER              OF MFS-W90-A999.            27376000
273770     MOVE TAX-YR-DT                   OF 100-1042S-RPT-INFO-REC   27377000
273780       TO TAX-YR-DT                   OF MFS-W90-A999.            27378000
273790     MOVE TAX-RSP-ST-CNY-CD           OF 100-1042S-RPT-INFO-REC   27379000
273791       TO TAX-RSP-ST-CNY-CD           OF MFS-W90-A999.            27379100
273792     MOVE INCOME-TYPE-CD              OF 100-1042S-RPT-INFO-REC   27379200
273793       TO INCOME-TYPE-CD              OF MFS-W90-A999.            27379300
273794                                                                  27379400
273795     IF TAX-RSP-TAX-ID                OF 100-1042S-RPT-INFO-REC   27379500
273796     IS NUMERIC                                                   27379600
273797     AND TAX-RSP-TAX-ID               OF 100-1042S-RPT-INFO-REC   27379700
273798      >= +0                                                       27379800
273799         SET TAX-RSP-TAX-ID-NN        OF MFS-W90-A999             27379900
273800          TO TRUE                                                 27380000
273801        MOVE TAX-RSP-TAX-ID           OF 100-1042S-RPT-INFO-REC   27380100
273802          TO TAX-RSP-TAX-ID           OF MFS-W90-A999             27380200
273803     ELSE                                                         27380300
273804         SET TAX-RSP-TAX-ID-NY        OF MFS-W90-A999             27380400
273805          TO TRUE                                                 27380500
273806     END-IF.                                                      27380600
273807                                                                  27380700
273808     MOVE CH3-TAX-RT                  OF 100-1042S-RPT-INFO-REC   27380800
273809       TO CH3-TAX-RT                  OF MFS-W90-A999.            27380900
273810     MOVE CH4-TAX-RT                  OF 100-1042S-RPT-INFO-REC   27381000
273811       TO CH4-TAX-RT                  OF MFS-W90-A999.            27381100
273812     MOVE CH3-WITHHOLDING-CD          OF 100-1042S-RPT-INFO-REC   27381200
273813       TO CH3-WITHHOLDING-CD          OF MFS-W90-A999.            27381300
273814     MOVE CH4-WITHHOLDING-CD          OF 100-1042S-RPT-INFO-REC   27381400
273815       TO CH4-WITHHOLDING-CD          OF MFS-W90-A999.            27381500
273816                                                                  27381600
273817     IF CH3-EXEMPTION-CD              OF 100-1042S-RPT-INFO-REC   27381700
273818      > SPACES                                                    27381800
273819        SET CH3-EXEMPTION-CD-NN       OF MFS-W90-A999             27381900
273820         TO TRUE                                                  27382000
273821        MOVE CH3-EXEMPTION-CD         OF 100-1042S-RPT-INFO-REC   27382100
273822          TO CH3-EXEMPTION-CD         OF MFS-W90-A999             27382200
273823     ELSE                                                         27382300
273824        SET CH3-EXEMPTION-CD-NY       OF MFS-W90-A999             27382400
273825         TO TRUE                                                  27382500
273826     END-IF.                                                      27382600
273827                                                                  27382700
273828     IF CH4-EXEMPTION-CD              OF 100-1042S-RPT-INFO-REC   27382800
273829      > SPACES                                                    27382900
273830         SET CH4-EXEMPTION-CD-NN      OF MFS-W90-A999             27383000
273831          TO TRUE                                                 27383100
273832        MOVE CH4-EXEMPTION-CD         OF 100-1042S-RPT-INFO-REC   27383200
273833          TO CH4-EXEMPTION-CD         OF MFS-W90-A999             27383300
273834     ELSE                                                         27383400
273835         SET CH4-EXEMPTION-CD-NY      OF MFS-W90-A999             27383500
273836          TO TRUE                                                 27383600
273837     END-IF.                                                      27383700
273838                                                                  27383800
273839     IF TAX-RSP-CH3-STA-CODE-TYP-ID   OF 100-1042S-RPT-INFO-REC   27383900
273840     IS NUMERIC                                                   27384000
273841     AND TAX-RSP-CH3-STA-CODE-TYP-ID  OF 100-1042S-RPT-INFO-REC   27384100
273842       > +0                                                       27384200
273843         SET TAX-RSP-CH3-STA-CODE-TYP-ID-NN OF MFS-W90-A999       27384300
273844          TO TRUE                                                 27384400
273845        MOVE TAX-RSP-CH3-STA-CODE-TYP-ID OF 100-1042S-RPT-INFO-REC27384500
273846          TO TAX-RSP-CH3-STA-CODE-TYP-ID OF MFS-W90-A999          27384600
273847     ELSE                                                         27384700
273848         SET TAX-RSP-CH3-STA-CODE-TYP-ID-NY OF MFS-W90-A999       27384800
273849          TO TRUE                                                 27384900
273850     END-IF.                                                      27385000
273851                                                                  27385100
273852     IF TAX-RSP-CH3-STA-CODE-ID       OF 100-1042S-RPT-INFO-REC   27385200
273853      > SPACES                                                    27385300
273854         SET TAX-RSP-CH3-STA-CODE-ID-NN OF MFS-W90-A999           27385400
273855          TO TRUE                                                 27385500
273856        MOVE TAX-RSP-CH3-STA-CODE-ID  OF 100-1042S-RPT-INFO-REC   27385600
273857          TO TAX-RSP-CH3-STA-CODE-ID  OF MFS-W90-A999             27385700
273858     ELSE                                                         27385800
273859         SET TAX-RSP-CH3-STA-CODE-ID-NY OF MFS-W90-A999           27385900
273860          TO TRUE                                                 27386000
273861     END-IF.                                                      27386100
273862                                                                  27386200
273863     IF TAX-RSP-CH4-STA-CODE-TYP-ID OF 100-1042S-RPT-INFO-REC     27386300
273864     IS NUMERIC                                                   27386400
273865     AND  TAX-RSP-CH4-STA-CODE-TYP-ID OF 100-1042S-RPT-INFO-REC   27386500
273866       > +0                                                       27386600
273867         SET TAX-RSP-CH4-STA-CODE-TYP-ID-NN OF MFS-W90-A999       27386700
273868          TO TRUE                                                 27386800
273869        MOVE TAX-RSP-CH4-STA-CODE-TYP-ID OF 100-1042S-RPT-INFO-REC27386900
273870          TO TAX-RSP-CH4-STA-CODE-TYP-ID OF MFS-W90-A999          27387000
273871     ELSE                                                         27387100
273872         SET TAX-RSP-CH4-STA-CODE-TYP-ID-NY OF MFS-W90-A999       27387200
273873          TO TRUE                                                 27387300
273874     END-IF.                                                      27387400
273875                                                                  27387500
273876     IF TAX-RSP-CH4-STA-CODE-ID       OF 100-1042S-RPT-INFO-REC   27387600
273877      > SPACES                                                    27387700
273878         SET TAX-RSP-CH4-STA-CODE-ID-NN OF MFS-W90-A999           27387800
273879          TO TRUE                                                 27387900
273880        MOVE TAX-RSP-CH4-STA-CODE-ID  OF 100-1042S-RPT-INFO-REC   27388000
273881          TO TAX-RSP-CH4-STA-CODE-ID  OF MFS-W90-A999             27388100
273882     ELSE                                                         27388200
273883         SET TAX-RSP-CH4-STA-CODE-ID-NY OF MFS-W90-A999           27388300
273884          TO TRUE                                                 27388400
273885     END-IF.                                                      27388500
273886                                                                  27388600
273887     IF LMT-ON-BEN-CD                 OF 100-1042S-RPT-INFO-REC   27388700
273888      > SPACES                                                    27388800
273889         SET LMT-ON-BEN-CD-NN         OF MFS-W90-A999             27388900
273890          TO TRUE                                                 27389000
273891        MOVE LMT-ON-BEN-CD            OF 100-1042S-RPT-INFO-REC   27389100
273892          TO LMT-ON-BEN-CD            OF MFS-W90-A999             27389200
273893     ELSE                                                         27389300
273894         SET LMT-ON-BEN-CD-NY         OF MFS-W90-A999             27389400
273895          TO TRUE                                                 27389500
271900     END-IF.                                                      27190099
276001                                                                  27600101
276010 6860-MOVE-W90-TO-SAVE-STATUS3.                                   27601001
276030                                                                  27603001
276040     MOVE FUND-CODE                   OF MFS-W90-A999             27604001
276050       TO FUND-CODE                   OF WS-SAVE-W90-STATUS-3.    27605001
276060                                                                  27606001
276070     MOVE ACCOUNT-NUMBER              OF MFS-W90-A999             27607001
276080       TO ACCOUNT-NUMBER              OF WS-SAVE-W90-STATUS-3.    27608001
276090                                                                  27609001
276091     MOVE TAX-YR-DT                   OF MFS-W90-A999             27609101
276092       TO TAX-YR-DT                   OF WS-SAVE-W90-STATUS-3.    27609201
276093                                                                  27609301
276094     MOVE TAX-RSP-ST-CNY-CD           OF MFS-W90-A999             27609401
276095       TO TAX-RSP-ST-CNY-CD           OF WS-SAVE-W90-STATUS-3.    27609501
276096                                                                  27609601
276102     MOVE INCOME-TYPE-CD              OF MFS-W90-A999             27610201
276103       TO INCOME-TYPE-CD              OF WS-SAVE-W90-STATUS-3.    27610301
276104                                                                  27610401
276105     MOVE CH3-TAX-RT                  OF MFS-W90-A999             27610501
276106       TO CH3-TAX-RT                  OF WS-SAVE-W90-STATUS-3.    27610601
276107                                                                  27610701
276108     MOVE CH4-TAX-RT                  OF MFS-W90-A999             27610801
276109       TO CH4-TAX-RT                  OF WS-SAVE-W90-STATUS-3.    27610901
276110                                                                  27611001
276111     MOVE CH3-WITHHOLDING-CD          OF MFS-W90-A999             27611101
276112       TO CH3-WITHHOLDING-CD          OF WS-SAVE-W90-STATUS-3.    27611201
276113                                                                  27611301
276114     MOVE CH4-WITHHOLDING-CD          OF MFS-W90-A999             27611401
276115       TO CH4-WITHHOLDING-CD          OF WS-SAVE-W90-STATUS-3.    27611501
276116                                                                  27611601
276117     MOVE CH3-EXEMPTION-CD            OF MFS-W90-A999             27611701
276118       TO CH3-EXEMPTION-CD            OF WS-SAVE-W90-STATUS-3.    27611801
276119                                                                  27611901
276120     MOVE CH4-EXEMPTION-CD            OF MFS-W90-A999             27612001
276121       TO CH4-EXEMPTION-CD            OF WS-SAVE-W90-STATUS-3.    27612101
276122                                                                  27612201
276123     MOVE TAX-RSP-CH3-STA-CODE-TYP-ID OF MFS-W90-A999             27612301
276124       TO TAX-RSP-CH3-STA-CODE-TYP-ID OF WS-SAVE-W90-STATUS-3.    27612401
276125                                                                  27612501
276126     MOVE TAX-RSP-CH3-STA-CODE-ID     OF MFS-W90-A999             27612601
276127       TO TAX-RSP-CH3-STA-CODE-ID     OF WS-SAVE-W90-STATUS-3.    27612701
276128                                                                  27612801
276129     MOVE TAX-RSP-CH4-STA-CODE-TYP-ID OF MFS-W90-A999             27612901
276130       TO TAX-RSP-CH4-STA-CODE-TYP-ID                             27613001
276131       OF WS-SAVE-W90-STATUS-3.                                   27613101
276132                                                                  27613201
276133     MOVE TAX-RSP-CH4-STA-CODE-ID     OF MFS-W90-A999             27613301
276134       TO TAX-RSP-CH4-STA-CODE-ID     OF WS-SAVE-W90-STATUS-3.    27613401
276135                                                                  27613501
276136     MOVE LMT-ON-BEN-CD               OF MFS-W90-A999             27613601
276137       TO LMT-ON-BEN-CD               OF WS-SAVE-W90-STATUS-3.    27613701
276138                                                                  27613801
276140 6870-MOVE-W90-TO-SAVE-STATUS2.                                   27614001
276141                                                                  27614101
276142     MOVE FUND-CODE                   OF MFS-W90-A999             27614201
276150       TO FUND-CODE                   OF WS-SAVE-W90-STATUS-2.    27615001
276160                                                                  27616001
276170     MOVE ACCOUNT-NUMBER              OF MFS-W90-A999             27617001
276180       TO ACCOUNT-NUMBER              OF WS-SAVE-W90-STATUS-2.    27618001
276190                                                                  27619001
276191     MOVE TAX-YR-DT                   OF MFS-W90-A999             27619101
276192       TO TAX-YR-DT                   OF WS-SAVE-W90-STATUS-2.    27619201
276193                                                                  27619301
276194     MOVE TAX-RSP-ST-CNY-CD           OF MFS-W90-A999             27619401
276195       TO TAX-RSP-ST-CNY-CD           OF WS-SAVE-W90-STATUS-2.    27619501
276196                                                                  27619601
276202     MOVE INCOME-TYPE-CD              OF MFS-W90-A999             27620201
276203       TO INCOME-TYPE-CD              OF WS-SAVE-W90-STATUS-2.    27620301
276204                                                                  27620401
276205     MOVE CH3-TAX-RT                  OF MFS-W90-A999             27620501
276206       TO CH3-TAX-RT                  OF WS-SAVE-W90-STATUS-2.    27620601
276207                                                                  27620701
276208     MOVE CH4-TAX-RT                  OF MFS-W90-A999             27620801
276209       TO CH4-TAX-RT                  OF WS-SAVE-W90-STATUS-2.    27620901
276210                                                                  27621001
276211     MOVE CH3-WITHHOLDING-CD          OF MFS-W90-A999             27621101
276212       TO CH3-WITHHOLDING-CD          OF WS-SAVE-W90-STATUS-2.    27621201
276213                                                                  27621301
276214     MOVE CH4-WITHHOLDING-CD          OF MFS-W90-A999             27621401
276215       TO CH4-WITHHOLDING-CD          OF WS-SAVE-W90-STATUS-2.    27621501
276216                                                                  27621601
276217     MOVE CH3-EXEMPTION-CD            OF MFS-W90-A999             27621701
276218       TO CH3-EXEMPTION-CD            OF WS-SAVE-W90-STATUS-2.    27621801
276219                                                                  27621901
276220     MOVE CH4-EXEMPTION-CD            OF MFS-W90-A999             27622001
276221       TO CH4-EXEMPTION-CD            OF WS-SAVE-W90-STATUS-2.    27622101
276222                                                                  27622201
276223     MOVE TAX-RSP-CH3-STA-CODE-TYP-ID OF MFS-W90-A999             27622301
276224       TO TAX-RSP-CH3-STA-CODE-TYP-ID OF WS-SAVE-W90-STATUS-2.    27622401
276225                                                                  27622501
276226     MOVE TAX-RSP-CH3-STA-CODE-ID     OF MFS-W90-A999             27622601
276227       TO TAX-RSP-CH3-STA-CODE-ID     OF WS-SAVE-W90-STATUS-2.    27622701
276228                                                                  27622801
276229     MOVE TAX-RSP-CH4-STA-CODE-TYP-ID OF MFS-W90-A999             27622901
276230       TO TAX-RSP-CH4-STA-CODE-TYP-ID                             27623001
276231       OF WS-SAVE-W90-STATUS-2.                                   27623101
276232                                                                  27623201
276233     MOVE TAX-RSP-CH4-STA-CODE-ID     OF MFS-W90-A999             27623301
276234       TO TAX-RSP-CH4-STA-CODE-ID     OF WS-SAVE-W90-STATUS-2.    27623401
276235                                                                  27623501
276236     MOVE LMT-ON-BEN-CD               OF MFS-W90-A999             27623601
276237       TO LMT-ON-BEN-CD               OF WS-SAVE-W90-STATUS-2.    27623701
272000                                                                  27200099
272100                                                                  27210099
272200 6900-INSERT-W92-STATUS-3.                                        27220099
272300                                                                  27230099
272400     PERFORM 8700-CALL-SR0622.                                    27240099
272500                                                                  27250099
272600     SET  WS-W92                                                  27260099
272700          WS-INSERT                                               27270099
272800          WS-STATUS-3 TO TRUE.                                    27280099
272900     MOVE WS-CURR-W92-REC                TO MFS-W92-A999.         27290099
273000     MOVE WS-JOB-ID                                               27300099
273100       TO ADD-JOB-ID                     OF MFS-W92-A999          27310099
273200     MOVE PARM-TIMESTAMP                 OF PSR0622               27320099
273300       TO LAST-MNT-DATE-TIME             OF MFS-W92-A999.         27330099
273400     MOVE ZEROS                                                   27340099
273500       TO GROSS-INCOME-AT                OF MFS-W92-A999          27350099
273600          TAX-WITHHOLDING-AT             OF MFS-W92-A999.         27360099
273700     MOVE WS-CURRENT-DATE                                         27370099
273800       TO REPORTING-STATUS-DT            OF MFS-W92-A999.         27380099
273900      SET REPORTING-STATUS-DT-NN         OF MFS-W92-A999          27390099
274000          REPORTING-STATUS-ZERO-REQUIRED OF MFS-W92-A999          27400099
274100       TO TRUE.                                                   27410099
274200                                                                  27420099
274300     PERFORM 8000-SET-W92-NULL-INDICATOR.                         27430099
274400     PERFORM 8500-AUDIT-D86.                                      27440099
274500     MOVE PARM-TIMESTAMP                OF PSR0622                27450099
274600       TO ADD-DT-TM                     OF MFS-W92-A999.          27460099
274700                                                                  27470099
274800     PERFORM 7850-GET-AMENDMENT.                                  27480099
274900                                                                  27490099
275000     PERFORM 7500-INSERT-W92-RECORD.                              27500099
275100                                                                  27510099
275200 6950-UPDATE-W92-STATUS-3.                                        27520099
275300                                                                  27530099
275400     PERFORM 8700-CALL-SR0622.                                    27540099
275500                                                                  27550099
275600     SET  WS-W92                                                  27560099
275700          WS-UPDATE                                               27570099
275800          WS-STATUS-3 TO TRUE.                                    27580099
275900     MOVE WS-CURR-W92-REC                TO MFS-W92-A999.         27590099
276000     MOVE WS-JOB-ID                                               27600099
276100       TO ADD-JOB-ID                     OF MFS-W92-A999          27610099
276200     MOVE PARM-TIMESTAMP                 OF PSR0622               27620099
276300       TO LAST-MNT-DATE-TIME             OF MFS-W92-A999.         27630099
276400      SET REPORTING-STATUS-ZERO-REQUIRED OF MFS-W92-A999          27640099
276500       TO TRUE.                                                   27650099
276600     MOVE ZEROS                                                   27660099
276700       TO GROSS-INCOME-AT                OF MFS-W92-A999          27670099
276800          TAX-WITHHOLDING-AT             OF MFS-W92-A999.         27680099
276900     MOVE WS-CURRENT-DATE                                         27690099
277000       TO REPORTING-STATUS-DT            OF MFS-W92-A999.         27700099
277100      SET REPORTING-STATUS-DT-NN         OF MFS-W92-A999          27710099
277200       TO TRUE.                                                   27720099
277300      PERFORM 8000-SET-W92-NULL-INDICATOR.                        27730099
277400      PERFORM 8500-AUDIT-D86.                                     27740099
277500                                                                  27750099
277600     PERFORM 7850-GET-AMENDMENT.                                  27760099
277700                                                                  27770099
277800     PERFORM 7350-UPDATE-W92-RECORD.                              27780099
277900                                                                  27790099
278000                                                                  27800099
278100 7000-OPEN-W90-W92-CURSOR.                                        27810099
278200                                                                  27820099
278300     INITIALIZE MFS-W90-A999                                      27830099
278400                MFS-W92-A999.                                     27840099
278500                                                                  27850099
278600     MOVE FUND-CODE                OF 110-ACCT-DRIVER-REC         27860099
278700       TO FUND-CODE                OF MFS-W90-A999.               27870099
278800     MOVE ACCOUNT-NUMBER           OF 110-ACCT-DRIVER-REC         27880099
278900       TO ACCOUNT-NUMBER           OF MFS-W90-A999.               27890099
279000     MOVE TAX-PROCESSING-YEAR-DATE OF 110-ACCT-DRIVER-REC         27900099
279100       TO TAX-YR-DT                OF MFS-W90-A999.               27910099
279200                                                                  27920099
279300     EXEC  SQL                                                    27930099
279400          OPEN  W90_W92_CURSOR                                    27940099
279500     END-EXEC.                                                    27950099
279600                                                                  27960099
279700     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE OF WS00575.             27970099
279800                                                                  27980099
279900     EVALUATE TRUE                                                27990099
280000       WHEN SQL-RETURN-SUCCESSFUL   OF WS00575                    28000099
280100            CONTINUE                                              28010099
280200       WHEN OTHER                                                 28020099
280300            DISPLAY '************ B27935 ABENDING ************'   28030099
280400               UPON CONSOLE                                       28040099
280500            DISPLAY '* PARAGRAPH : 7000-OPEN-W90-W92-CURSOR  *'   28050099
280600               UPON CONSOLE                                       28060099
280700            DISPLAY '* UNSUCCESSFUL OPEN  W90_W92_CURSOR     *'   28070099
280800               UPON CONSOLE                                       28080099
280900            DISPLAY '* RETURN CODE    : '                         28090099
281000                    SQLSTATE-RETURN-CDE    OF WS00575             28100099
281100               UPON CONSOLE                                       28110099
281200            DISPLAY '* FUND CODE      : '                         28120099
281300                    FUND-CODE              OF MFS-W90-A999        28130099
281400               UPON CONSOLE                                       28140099
281500            DISPLAY '* ACCOUNT NUMBER : '                         28150099
281600                    ACCOUNT-NUMBER         OF MFS-W90-A999        28160099
281700               UPON CONSOLE                                       28170099
281800            DISPLAY '* TAX YEAR       : '                         28180099
281900                    TAX-YR-DT              OF MFS-W90-A999        28190099
282000               UPON CONSOLE                                       28200099
282100            DISPLAY '*****************************************'   28210099
282200               UPON CONSOLE                                       28220099
282300            CALL SR0002                                           28230099
282400     END-EVALUATE.                                                28240099
282500                                                                  28250099
282600                                                                  28260099
282700 7050-FETCH-W90-W92-CURSOR.                                       28270099
282800                                                                  28280099
282900     EXEC SQL                                                     28290099
283000       FETCH W90_W92_CURSOR                                       28300099
283100       INTO                                                       28310099
283200             :MFS-W90-A999.ACCUMULATION-TYPE-CD                   28320099
283300            ,:MFS-W90-A999.MFA-1042S-RPT-ITEM-ID                  28330099
283400            ,:MFS-W90-A999.LAST-MNT-OPID                          28340099
283500            ,:MFS-W90-A999.LAST-MNT-DATE-TIME                     28350099
283600            ,:MFS-W90-A999.TAX-RSP-ST-CNY-CD                      28360099
283700            ,:MFS-W90-A999.INCOME-TYPE-CD                         28370099
283800            ,:MFS-W90-A999.TAX-RSP-TAX-ID                         28380099
284200               INDICATOR                                          28420007
284300             :MFS-W90-A999.TAX-RSP-TAX-ID-NC                      28430007
283900            ,:MFS-W90-A999.CH3-TAX-RT                             28390099
284000            ,:MFS-W90-A999.CH4-TAX-RT                             28400099
284100            ,:MFS-W90-A999.CH3-WITHHOLDING-CD                     28410099
284200            ,:MFS-W90-A999.CH4-WITHHOLDING-CD                     28420099
284300            ,:MFS-W90-A999.CH3-EXEMPTION-CD                       28430099
284900               INDICATOR                                          28490007
285000             :MFS-W90-A999.CH3-EXEMPTION-CD-NC                    28500007
284400            ,:MFS-W90-A999.CH4-EXEMPTION-CD                       28440099
285200               INDICATOR                                          28520007
285300             :MFS-W90-A999.CH4-EXEMPTION-CD-NC                    28530007
284500            ,:MFS-W90-A999.TAX-RSP-CH3-STA-CODE-TYP-ID            28450099
285500               INDICATOR                                          28550007
285600             :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-TYP-ID-NC         28560007
284600            ,:MFS-W90-A999.TAX-RSP-CH3-STA-CODE-ID                28460099
285800               INDICATOR                                          28580007
285900             :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-ID-NC             28590007
284700            ,:MFS-W90-A999.TAX-RSP-CH4-STA-CODE-TYP-ID            28470099
286100               INDICATOR                                          28610007
286200             :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-TYP-ID-NC         28620007
284800            ,:MFS-W90-A999.TAX-RSP-CH4-STA-CODE-ID                28480099
286400               INDICATOR                                          28640007
286500             :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-ID-NC             28650007
284900            ,:MFS-W90-A999.LMT-ON-BEN-CD                          28490099
286700               INDICATOR                                          28670007
286800             :MFS-W90-A999.LMT-ON-BEN-CD-NC                       28680007
285000            ,:MFS-W90-A999.UNIQUE-FORM-ID                         28500099
285100            ,:MFS-W92-A999.FUND-CODE                              28510099
285200            ,:MFS-W92-A999.ACCOUNT-NUMBER                         28520099
285300            ,:MFS-W92-A999.TAX-YR-DT                              28530099
285400            ,:MFS-W92-A999.ACCUMULATION-TYPE-CD                   28540099
285500            ,:MFS-W92-A999.MFA-1042S-RPT-ITEM-ID                  28550099
285600            ,:MFS-W92-A999.ADD-DT-TM                              28560099
285700            ,:MFS-W92-A999.LAST-MNT-OPID                          28570099
285800            ,:MFS-W92-A999.LAST-MNT-DATE-TIME                     28580099
285900            ,:MFS-W92-A999.GROSS-INCOME-AT                        28590099
286000            ,:MFS-W92-A999.TAX-WITHHOLDING-AT                     28600099
286100            ,:MFS-W92-A999.TAX-RSP-GIIN-EXTERNAL-ID               28610099
288100               INDICATOR                                          28810007
288200             :MFS-W92-A999.TAX-RSP-GIIN-EXTERNAL-ID-NC            28820007
286200            ,:MFS-W92-A999.REPORTING-STATUS-CD                    28620099
286300            ,:MFS-W92-A999.REPORTING-STATUS-DT                    28630099
286400               INDICATOR                                          28640099
286500             :MFS-W92-A999.REPORTING-STATUS-DT-NC                 28650099
286600            ,:MFS-W92-A999.NQI-EIN-ID                             28660099
286700            ,:MFS-W92-A999.NQI-GIIN-EXTERNAL-ID                   28670099
288900               INDICATOR                                          28890007
289000             :MFS-W92-A999.NQI-GIIN-EXTERNAL-ID-NC                28900007
286800            ,:MFS-W92-A999.NQI-STATE-COUNTRY-CD                   28680099
289200               INDICATOR                                          28920007
289300             :MFS-W92-A999.NQI-STATE-COUNTRY-CD-NC                28930007
286900            ,:MFS-W92-A999.NQI-FOREIGN-TAX-ID                     28690099
287000            ,:MFS-W92-A999.TAX-RSP-FOREIGN-TAX-ID                 28700099
289600               INDICATOR                                          28960007
289700             :MFS-W92-A999.TAX-RSP-FOREIGN-TAX-ID-NC              28970007
287100            ,:MFS-W92-A999.TAX-RSP-BIRTH-DT                       28710099
287200               INDICATOR                                          28720099
287300             :MFS-W92-A999.TAX-RSP-BIRTH-DT-NC                    28730099
287400            ,:MFS-W92-A999.NQI-CH3-STA-CODE-TYPE-ID               28740099
290200               INDICATOR                                          29020007
290300             :MFS-W92-A999.NQI-CH3-STA-CODE-TYPE-ID-NC            29030007
287500            ,:MFS-W92-A999.NQI-CH3-STA-CODE-ID                    28750099
290500               INDICATOR                                          29050007
290600             :MFS-W92-A999.NQI-CH3-STA-CODE-ID-NC                 29060007
287600            ,:MFS-W92-A999.NQI-CH4-STA-CODE-TYPE-ID               28760099
290800               INDICATOR                                          29080007
290900             :MFS-W92-A999.NQI-CH4-STA-CODE-TYPE-ID-NC            29090007
287700            ,:MFS-W92-A999.NQI-CH4-STA-CODE-ID                    28770099
291100               INDICATOR                                          29110007
291200             :MFS-W92-A999.NQI-CH4-STA-CODE-ID-NC                 29120007
287800            ,:MFS-W92-A999.ADD-JOB-ID                             28780099
287900            ,:MFS-W92-A999.PAYEE-LINE-1-NM                        28790099
288000            ,:MFS-W92-A999.PAYEE-LINE-2-NM                        28800099
288100            ,:MFS-W92-A999.PAYEE-ADDRESS-1-TX                     28810099
288200            ,:MFS-W92-A999.PAYEE-CITY-NM                          28820099
288300            ,:MFS-W92-A999.PAYEE-STATE-CD                         28830099
288400            ,:MFS-W92-A999.PAYEE-CAN-PVN-CD                       28840099
288500            ,:MFS-W92-A999.PYE-ADR-US-IRS-CD                      28850099
288600            ,:MFS-W92-A999.PAYEE-POSTAL-CD                        28860099
288700            ,:MFS-W92-A999.ACCOUNT-TYPE-CD                        28870099
288800            ,:MFS-W92-A999.NQI-LINE-1-NM                          28880099
288900            ,:MFS-W92-A999.NQI-LINE-2-NM                          28890099
289000            ,:MFS-W92-A999.NQI-LINE-3-NM                          28900099
289100            ,:MFS-W92-A999.NQI-ADR-LINE-1-TX                      28910099
289200            ,:MFS-W92-A999.NQI-ADR-LINE-2-TX                      28920099
289300            ,:MFS-W92-A999.NQI-CITY-NM                            28930099
289400            ,:MFS-W92-A999.NQI-CAN-PVN-CD                         28940099
289500            ,:MFS-W92-A999.NQI-US-IRS-CD                          28950099
289600            ,:MFS-W92-A999.NQI-ZIP-CD                             28960099
289700            ,:MFS-W92-A999.NQI-RPT-TAX-ID                         28970099
289800            ,:MFS-W92-A999.PAYER-TAX-ID                           28980099
289900            ,:MFS-W92-A999.PAYER-NM                               28990099
290000            ,:MFS-W92-A999.RECIPIENT-TYPE-CD                      29000099
290100            ,:MFS-W92-A999.AMENDMENT-NBR                          29010099
290200     END-EXEC.                                                    29020099
290300                                                                  29030099
290400     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE  OF WS00575.            29040099
290500                                                                  29050099
290600     EVALUATE TRUE                                                29060099
290700       WHEN SQL-RETURN-SUCCESSFUL          OF WS00575             29070099
290800            PERFORM 8900-SAVE-W90-KEY                             29080099
290900            IF REPORTING-STATUS-DT-NY      OF MFS-W92-A999        29090099
291000               MOVE SPACES                                        29100099
291100                 TO REPORTING-STATUS-DT    OF MFS-W92-A999        29110099
291200            END-IF                                                29120099
291300            IF TAX-RSP-BIRTH-DT-NY         OF MFS-W92-A999        29130099
291400               MOVE SPACES                                        29140099
291500                 TO TAX-RSP-BIRTH-DT       OF MFS-W92-A999        29150099
291600            END-IF                                                29160099
291700            MOVE MFS-W90-A999              TO WS-CURR-W90-REC     29170099
291800            MOVE MFS-W92-A999              TO WS-CURR-W92-REC     29180099
291900            SET WS-W90-W92-EOC-NO          TO TRUE                29190099
292000            MOVE AMENDMENT-NBR             OF WS-CURR-W92-REC     29200099
292100              TO WS-CUR-AMENDMENT-NBR                             29210099
292200       WHEN SQL-RETURN-END-OF-CURSOR       OF WS00575             29220099
292300            SET WS-W90-W92-EOC-YES         TO TRUE                29230099
292400            MOVE HIGH-VALUES                                      29240099
292500              TO WS-SAVE-W90-KEY                                  29250099
292600       WHEN OTHER                                                 29260099
292700            DISPLAY '************ B27935 ABENDING ************'   29270099
292800               UPON CONSOLE                                       29280099
292900            DISPLAY '* PARAGRAPH : 7050-FETCH-W90-W92-CURSOR *'   29290099
293000               UPON CONSOLE                                       29300099
293100            DISPLAY '* UNSUCCESSFUL FETCH W90_W92_CURSOR     *'   29310099
293200               UPON CONSOLE                                       29320099
293300            DISPLAY '* RETURN CODE    : '                         29330099
293400                    SQLSTATE-RETURN-CDE    OF WS00575             29340099
293500               UPON CONSOLE                                       29350099
293600            DISPLAY '* FUND CODE      : '                         29360099
293700                    FUND-CODE              OF MFS-W90-A999        29370099
293800               UPON CONSOLE                                       29380099
293900            DISPLAY '* ACCOUNT NUMBER : '                         29390099
294000                    ACCOUNT-NUMBER         OF MFS-W90-A999        29400099
294100               UPON CONSOLE                                       29410099
294200            DISPLAY '* TAX YEAR       : '                         29420099
294300                    TAX-YR-DT              OF MFS-W90-A999        29430099
294400               UPON CONSOLE                                       29440099
294500            DISPLAY '*****************************************'   29450099
294600               UPON CONSOLE                                       29460099
294700            CALL SR0002                                           29470099
294800     END-EVALUATE.                                                29480099
294900                                                                  29490099
295000                                                                  29500099
295100 7100-CLOSE-W90-W92-CURSOR.                                       29510099
295200                                                                  29520099
295300     EXEC SQL                                                     29530099
295400       CLOSE W90_W92_CURSOR                                       29540099
295500     END-EXEC.                                                    29550099
295600                                                                  29560099
295700     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE OF WS00575.             29570099
295800                                                                  29580099
295900     EVALUATE TRUE                                                29590099
296000       WHEN SQL-RETURN-SUCCESSFUL   OF WS00575                    29600099
296100            CONTINUE                                              29610099
296200       WHEN OTHER                                                 29620099
296300            DISPLAY '************ B27935 ABENDING ************'   29630099
296400               UPON CONSOLE                                       29640099
296500            DISPLAY '* PARAGRAPH : 7100-CLOSE-W90-W92-CURSOR *'   29650099
296600               UPON CONSOLE                                       29660099
296700            DISPLAY '* UNSUCCESSFUL CLOSE W90_W92_CURSOR     *'   29670099
296800               UPON CONSOLE                                       29680099
296900            DISPLAY '* RETURN CODE    : '                         29690099
297000                    SQLSTATE-RETURN-CDE    OF WS00575             29700099
297100               UPON CONSOLE                                       29710099
297200            DISPLAY '* FUND CODE      : '                         29720099
297300                    FUND-CODE              OF MFS-W90-A999        29730099
297400               UPON CONSOLE                                       29740099
297500            DISPLAY '* ACCOUNT NUMBER : '                         29750099
297600                    ACCOUNT-NUMBER         OF MFS-W90-A999        29760099
297700               UPON CONSOLE                                       29770099
297800            DISPLAY '* TAX YEAR       : '                         29780099
297900                    TAX-YR-DT              OF MFS-W90-A999        29790099
298000               UPON CONSOLE                                       29800099
298100            DISPLAY '*****************************************'   29810099
298200               UPON CONSOLE                                       29820099
298300            CALL SR0002                                           29830099
298400     END-EVALUATE.                                                29840099
298500                                                                  29850099
298600                                                                  29860099
298700 7150-SELECT-MAX-SEQ-NO.                                          29870099
298800                                                                  29880099
298900     MOVE FUND-CODE            OF 100-1042S-RPT-INFO-REC          29890099
299000       TO FUND-CODE            OF MFS-W90-A999.                   29900099
299100     MOVE ACCOUNT-NUMBER       OF 100-1042S-RPT-INFO-REC          29910099
299200       TO ACCOUNT-NUMBER       OF MFS-W90-A999.                   29920099
299300     MOVE TAX-YR-DT            OF 100-1042S-RPT-INFO-REC          29930099
299400       TO TAX-YR-DT            OF MFS-W90-A999.                   29940099
299500     MOVE ACCUMULATION-TYPE-CD OF 100-1042S-RPT-INFO-REC          29950099
299600       TO ACCUMULATION-TYPE-CD OF MFS-W90-A999.                   29960099
299700                                                                  29970099
299800     EXEC SQL                                                     29980099
299900          SELECT                                                  29990099
300000                 COALESCE(MAX (W90.MFA_1042S_RPT_ITEM_ID),0)      30000099
300100            INTO                                                  30010099
300200                 :MFS-W90-A999.MFA-1042S-RPT-ITEM-ID              30020099
300300            FROM W90_A999   AS W90                                30030099
300400           WHERE W90.FUND_CODE                                    30040099
300500                 = :MFS-W90-A999.FUND-CODE                        30050099
300600             AND W90.ACCOUNT_NUMBER                               30060099
300700                 = :MFS-W90-A999.ACCOUNT-NUMBER                   30070099
300800             AND W90.TAX_YR_DT                                    30080099
300900                 = :MFS-W90-A999.TAX-YR-DT                        30090099
301000             AND W90.ACCUMULATION_TYPE_CD                         30100099
301100                 = :MFS-W90-A999.ACCUMULATION-TYPE-CD             30110099
301200     END-EXEC.                                                    30120099
301300                                                                  30130099
301400     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE OF WS00575.             30140099
301500                                                                  30150099
301600     EVALUATE TRUE                                                30160099
301700       WHEN SQL-RETURN-SUCCESSFUL OF WS00575                      30170099
301800            ADD WS-ONE                                            30180099
301900             TO MFA-1042S-RPT-ITEM-ID OF MFS-W90-A999             30190099
302000       WHEN OTHER                                                 30200099
302100            DISPLAY '************ B27935 ABENDING ************'   30210099
302200               UPON CONSOLE                                       30220099
302300            DISPLAY '* PARAGRAPH : 7150-SELECT-MAX-SEQ-NO    *'   30230099
302400               UPON CONSOLE                                       30240099
302500            DISPLAY '* UNSUCCESSFUL SELECT W90 TABLE         *'   30250099
302600               UPON CONSOLE                                       30260099
302700            DISPLAY '* RETURN CODE    : '                         30270099
302800                    SQLSTATE-RETURN-CDE    OF WS00575             30280099
302900               UPON CONSOLE                                       30290099
303000            DISPLAY '* FUND CODE      : '                         30300099
303100                    FUND-CODE              OF MFS-W90-A999        30310099
303200               UPON CONSOLE                                       30320099
303300            DISPLAY '* ACCOUNT NUMBER : '                         30330099
303400                    ACCOUNT-NUMBER         OF MFS-W90-A999        30340099
303500               UPON CONSOLE                                       30350099
303600            DISPLAY '* TAX YEAR       : '                         30360099
303700                    TAX-YR-DT              OF MFS-W90-A999        30370099
303800               UPON CONSOLE                                       30380099
303900            DISPLAY '* ACCUMULATION CD:'                          30390099
304000                    ACCUMULATION-TYPE-CD   OF MFS-W90-A999        30400099
304100               UPON CONSOLE                                       30410099
304200            DISPLAY '*****************************************'   30420099
304300               UPON CONSOLE                                       30430099
304400            CALL SR0002                                           30440099
304500     END-EVALUATE.                                                30450099
304600                                                                  30460099
304700                                                                  30470099
304800 7200-DELETE-W92.                                                 30480099
304900                                                                  30490099
305000     EXEC SQL                                                     30500099
305100       DELETE FROM W92_A999                                       30510099
305200       WHERE FUND_CODE                                            30520099
305300             = :MFS-W92-A999.FUND-CODE                            30530099
305400         AND ACCOUNT_NUMBER                                       30540099
305500             = :MFS-W92-A999.ACCOUNT-NUMBER                       30550099
305600         AND TAX_YR_DT                                            30560099
305700             = :MFS-W92-A999.TAX-YR-DT                            30570099
305800         AND ACCUMULATION_TYPE_CD                                 30580099
305900             = :MFS-W92-A999.ACCUMULATION-TYPE-CD                 30590099
306000         AND MFA_1042S_RPT_ITEM_ID                                30600099
306100             = :MFS-W92-A999.MFA-1042S-RPT-ITEM-ID                30610099
306200         AND ADD_DT_TM                                            30620099
306300             = :MFS-W92-A999.ADD-DT-TM                            30630099
306400     END-EXEC.                                                    30640099
306500                                                                  30650099
306600                                                                  30660099
306700     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE OF WS00575.             30670099
306800                                                                  30680099
306900     EVALUATE TRUE                                                30690099
307000         WHEN SQL-RETURN-SUCCESSFUL       OF WS00575              30700099
307100              ADD WS-ONE TO               WS-W92-DEL-CNT          30710099
307200              MOVE 'W92A999'                                      30720099
307300                TO AUDIT-DATAVIEW-ID      OF PSR1184              30730099
307400              MOVE LENGTH                 OF MFS-W92-A999         30740099
307500                TO DATAVIEW-IMAGE-TXT-LEN OF PSR1184              30750099
307600              PERFORM 8600-CALL-SR1184                            30760099
307700         WHEN SQL-RETURN-NOT-FOUND           OF WS00575           30770099
307800              CONTINUE                                            30780099
307900         WHEN OTHER                                               30790099
308000              DISPLAY '************ B27935 ABENDING ************' 30800099
308100                 UPON CONSOLE                                     30810099
308200              DISPLAY '* PARAGRAPH : 7200-DELETE-W92           *' 30820099
308300                 UPON CONSOLE                                     30830099
308400              DISPLAY '* UNSUCCESSFUL DELETE W92 TABLE         *' 30840099
308500                 UPON CONSOLE                                     30850099
308600              DISPLAY '* RETURN CODE    : '                       30860099
308700                      SQLSTATE-RETURN-CDE    OF WS00575           30870099
308800                 UPON CONSOLE                                     30880099
308900              DISPLAY '* FUND CODE      : '                       30890099
309000                      FUND-CODE              OF MFS-W92-A999      30900099
309100                 UPON CONSOLE                                     30910099
309200              DISPLAY '* ACCOUNT NUMBER : '                       30920099
309300                      ACCOUNT-NUMBER         OF MFS-W92-A999      30930099
309400                 UPON CONSOLE                                     30940099
309500              DISPLAY '* TAX YEAR       : '                       30950099
309600                      TAX-YR-DT              OF MFS-W92-A999      30960099
309700                 UPON CONSOLE                                     30970099
309800              DISPLAY '* ACCUMULATION CD:'                        30980099
309900                      ACCUMULATION-TYPE-CD   OF MFS-W92-A999      30990099
310000                 UPON CONSOLE                                     31000099
310100              DISPLAY '* ITEM ID        : '                       31010099
310200                      MFA-1042S-RPT-ITEM-ID  OF MFS-W92-A999      31020099
310300                 UPON CONSOLE                                     31030099
310400              DISPLAY '* ADD DATE TIME  : '                       31040099
310500                      ADD-DT-TM              OF MFS-W92-A999      31050099
310600                 UPON CONSOLE                                     31060099
310700              DISPLAY '*****************************************' 31070099
310800                 UPON CONSOLE                                     31080099
310900              CALL SR0002                                         31090099
311000       END-EVALUATE.                                              31100099
311100                                                                  31110099
311200                                                                  31120099
311300 7250-SELECT-EXIST-W92-CHILD.                                     31130099
311400                                                                  31140099
311500     SET WS-W92-CHILD-EXIST-NO TO TRUE.                           31150099
311600                                                                  31160099
311700     EXEC SQL                                                     31170099
311800          SELECT                                                  31180099
311900                 'Y'                                              31190099
312000            INTO                                                  31200099
312100                 :WS-W92-CHILD-EXIST-CD                           31210099
312200            FROM                                                  31220099
312300                 W92_A999   AS W92                                31230099
312400           WHERE                                                  31240099
312500                 W92.FUND_CODE                                    31250099
312600                 = :MFS-W92-A999.FUND-CODE                        31260099
312700             AND W92.ACCOUNT_NUMBER                               31270099
312800                 = :MFS-W92-A999.ACCOUNT-NUMBER                   31280099
312900             AND W92.TAX_YR_DT                                    31290099
313000                 = :MFS-W92-A999.TAX-YR-DT                        31300099
313100             AND W92.ACCUMULATION_TYPE_CD                         31310099
313200                 = :MFS-W92-A999.ACCUMULATION-TYPE-CD             31320099
313300             AND W92.MFA_1042S_RPT_ITEM_ID                        31330099
313400                 = :MFS-W92-A999.MFA-1042S-RPT-ITEM-ID            31340099
313500           FETCH FIRST 1 ROW ONLY                                 31350099
313600     END-EXEC.                                                    31360099
313700                                                                  31370099
313800     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE OF WS00575.             31380099
313900                                                                  31390099
314000     EVALUATE TRUE                                                31400099
314100         WHEN SQL-RETURN-SUCCESSFUL       OF WS00575              31410099
314200         WHEN SQL-RETURN-NOT-FOUND        OF WS00575              31420099
314300              CONTINUE                                            31430099
314400         WHEN OTHER                                               31440099
314500              DISPLAY '************ B27935 ABENDING ************' 31450099
314600                 UPON CONSOLE                                     31460099
314700              DISPLAY '* PARAGRAPH: 7250-SELECT-EXIST-W92-CHILD*' 31470099
314800                 UPON CONSOLE                                     31480099
314900              DISPLAY '* UNSUCCESSFUL SELECT W92 TABLE         *' 31490099
315000                 UPON CONSOLE                                     31500099
315100              DISPLAY '* RETURN CODE    : '                       31510099
315200                      SQLSTATE-RETURN-CDE    OF WS00575           31520099
315300                 UPON CONSOLE                                     31530099
315400              DISPLAY '* FUND CODE      : '                       31540099
315500                      FUND-CODE              OF MFS-W92-A999      31550099
315600                 UPON CONSOLE                                     31560099
315700              DISPLAY '* ACCOUNT NUMBER : '                       31570099
315800                      ACCOUNT-NUMBER         OF MFS-W92-A999      31580099
315900                 UPON CONSOLE                                     31590099
316000              DISPLAY '* TAX YEAR       : '                       31600099
316100                      TAX-YR-DT              OF MFS-W92-A999      31610099
316200                 UPON CONSOLE                                     31620099
316300              DISPLAY '* ACCUMULATION CD:'                        31630099
316400                      ACCUMULATION-TYPE-CD   OF MFS-W92-A999      31640099
316500                 UPON CONSOLE                                     31650099
316600              DISPLAY '* ITEM ID        : '                       31660099
316700                      MFA-1042S-RPT-ITEM-ID  OF MFS-W92-A999      31670099
316800                 UPON CONSOLE                                     31680099
316900              DISPLAY '*****************************************' 31690099
317000                 UPON CONSOLE                                     31700099
317100              CALL SR0002                                         31710099
317200     END-EVALUATE.                                                31720099
317300                                                                  31730099
317400                                                                  31740099
317500 7300-UPDATE-W92.                                                 31750099
317600                                                                  31760099
317700     SET WS-W92                                                   31770099
317800         WS-UPDATE TO TRUE.                                       31780099
317900     PERFORM 8500-AUDIT-D86.                                      31790099
318000     PERFORM 7400-PREPARE-W92-RECORD.                             31800099
318100     PERFORM 7350-UPDATE-W92-RECORD.                              31810099
318200                                                                  31820099
318300 7350-UPDATE-W92-RECORD.                                          31830099
318400                                                                  31840099
318500     EXEC SQL                                                     31850099
318600       UPDATE W92_A999                                            31860099
318700        SET LAST_MNT_OPID                                         31870099
318800              = :MFS-W92-A999.LAST-MNT-OPID                       31880099
318900            ,LAST_MNT_DATE_TIME                                   31890099
319000              = :MFS-W92-A999.LAST-MNT-DATE-TIME                  31900099
319100            ,GROSS_INCOME_AT                                      31910099
319200              = :MFS-W92-A999.GROSS-INCOME-AT                     31920099
319300            ,TAX_WITHHOLDING_AT                                   31930099
319400              = :MFS-W92-A999.TAX-WITHHOLDING-AT                  31940099
319500            ,TAX_RSP_GIIN_EXTERNAL_ID                             31950099
319600              = :MFS-W92-A999.TAX-RSP-GIIN-EXTERNAL-ID            31960099
319700               INDICATOR                                          31970099
319800                :MFS-W92-A999.TAX-RSP-GIIN-EXTERNAL-ID-NC         31980099
319900            ,REPORTING_STATUS_CD                                  31990099
320000              = :MFS-W92-A999.REPORTING-STATUS-CD                 32000099
320100            ,REPORTING_STATUS_DT                                  32010099
320200              = :MFS-W92-A999.REPORTING-STATUS-DT                 32020099
320300               INDICATOR                                          32030099
320400                :MFS-W92-A999.REPORTING-STATUS-DT-NC              32040099
320500            ,NQI_EIN_ID                                           32050099
320600              = :MFS-W92-A999.NQI-EIN-ID                          32060099
320700            ,NQI_GIIN_EXTERNAL_ID                                 32070099
320800              = :MFS-W92-A999.NQI-GIIN-EXTERNAL-ID                32080099
320900               INDICATOR                                          32090099
321000                :MFS-W92-A999.NQI-GIIN-EXTERNAL-ID-NC             32100099
321100            ,NQI_STATE_COUNTRY_CD                                 32110099
321200              = :MFS-W92-A999.NQI-STATE-COUNTRY-CD                32120099
321300               INDICATOR                                          32130099
321400                :MFS-W92-A999.NQI-STATE-COUNTRY-CD-NC             32140099
321500            ,NQI_FOREIGN_TAX_ID                                   32150099
321600              = :MFS-W92-A999.NQI-FOREIGN-TAX-ID                  32160099
321700            ,TAX_RSP_FOREIGN_TAX_ID                               32170099
321800              = :MFS-W92-A999.TAX-RSP-FOREIGN-TAX-ID              32180099
321900               INDICATOR                                          32190099
322000                :MFS-W92-A999.TAX-RSP-FOREIGN-TAX-ID-NC           32200099
322100            ,TAX_RSP_BIRTH_DT                                     32210099
322200              = :MFS-W92-A999.TAX-RSP-BIRTH-DT                    32220099
322300               INDICATOR                                          32230099
322400                :MFS-W92-A999.TAX-RSP-BIRTH-DT-NC                 32240099
322500            ,NQI_CH3_STA_CODE_TYPE_ID                             32250099
322600              = :MFS-W92-A999.NQI-CH3-STA-CODE-TYPE-ID            32260099
322700               INDICATOR                                          32270099
322800                :MFS-W92-A999.NQI-CH3-STA-CODE-TYPE-ID-NC         32280099
322900            ,NQI_CH3_STA_CODE_ID                                  32290099
323000              = :MFS-W92-A999.NQI-CH3-STA-CODE-ID                 32300099
323100               INDICATOR                                          32310099
323200                :MFS-W92-A999.NQI-CH3-STA-CODE-ID-NC              32320099
323300            ,NQI_CH4_STA_CODE_TYPE_ID                             32330099
323400              = :MFS-W92-A999.NQI-CH4-STA-CODE-TYPE-ID            32340099
323500               INDICATOR                                          32350099
323600                :MFS-W92-A999.NQI-CH4-STA-CODE-TYPE-ID-NC         32360099
323700            ,NQI_CH4_STA_CODE_ID                                  32370099
323800              = :MFS-W92-A999.NQI-CH4-STA-CODE-ID                 32380099
323900               INDICATOR                                          32390099
324000                :MFS-W92-A999.NQI-CH4-STA-CODE-ID-NC              32400099
324100            ,ADD_JOB_ID                                           32410099
324200              = :MFS-W92-A999.ADD-JOB-ID                          32420099
324300            ,AMENDMENT_NBR                                        32430099
324400              = :MFS-W92-A999.AMENDMENT-NBR                       32440099
324500       WHERE FUND_CODE                                            32450099
324600             = :MFS-W92-A999.FUND-CODE                            32460099
324700         AND ACCOUNT_NUMBER                                       32470099
324800             = :MFS-W92-A999.ACCOUNT-NUMBER                       32480099
324900         AND TAX_YR_DT                                            32490099
325000             = :MFS-W92-A999.TAX-YR-DT                            32500099
325100         AND ACCUMULATION_TYPE_CD                                 32510099
325200             = :MFS-W92-A999.ACCUMULATION-TYPE-CD                 32520099
325300         AND MFA_1042S_RPT_ITEM_ID                                32530099
325400             = :MFS-W92-A999.MFA-1042S-RPT-ITEM-ID                32540099
325500         AND ADD_DT_TM                                            32550099
325600             = :MFS-W92-A999.ADD-DT-TM                            32560099
325700     END-EXEC.                                                    32570099
325800                                                                  32580099
325900     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE   OF WS00575.           32590099
326000                                                                  32600099
326100     EVALUATE TRUE                                                32610099
326200         WHEN SQL-RETURN-SUCCESSFUL         OF WS00575            32620099
326300               ADD WS-ONE                   TO WS-W92-UPD-CNT     32630099
326400              MOVE 'W92A999'                                      32640099
326500                TO AUDIT-DATAVIEW-ID        OF PSR1184            32650099
326600              MOVE MFS-W92-A999                                   32660099
326700                TO AFTER-RECORD             OF PSR1184            32670099
326800              MOVE LENGTH                   OF MFS-W92-A999       32680099
326900                TO DATAVIEW-IMAGE-TXT-LEN   OF PSR1184            32690099
327000              PERFORM 8600-CALL-SR1184                            32700099
327100         WHEN OTHER                                               32710099
327200              DISPLAY '************ B27935 ABENDING ************' 32720099
327300                 UPON CONSOLE                                     32730099
327400              DISPLAY '* PARAGRAPH : 7350-UPDATE-W92-RECORD    *' 32740099
327500                 UPON CONSOLE                                     32750099
327600              DISPLAY '* UNSUCCESSFUL UPDATE W92 TABLE         *' 32760099
327700                 UPON CONSOLE                                     32770099
327800              DISPLAY '* RETURN CODE    : '                       32780099
327900                      SQLSTATE-RETURN-CDE    OF WS00575           32790099
328000                 UPON CONSOLE                                     32800099
328100              DISPLAY '* FUND CODE      : '                       32810099
328200                      FUND-CODE              OF MFS-W92-A999      32820099
328300                 UPON CONSOLE                                     32830099
328400              DISPLAY '* ACCOUNT NUMBER : '                       32840099
328500                      ACCOUNT-NUMBER         OF MFS-W92-A999      32850099
328600                 UPON CONSOLE                                     32860099
328700              DISPLAY '* TAX YEAR       : '                       32870099
328800                      TAX-YR-DT              OF MFS-W92-A999      32880099
328900                 UPON CONSOLE                                     32890099
329000              DISPLAY '* ACCUMULATION CD:'                        32900099
329100                      ACCUMULATION-TYPE-CD   OF MFS-W92-A999      32910099
329200                 UPON CONSOLE                                     32920099
329300              DISPLAY '* ITEM ID        : '                       32930099
329400                      MFA-1042S-RPT-ITEM-ID  OF MFS-W92-A999      32940099
329500                 UPON CONSOLE                                     32950099
329600              DISPLAY '* ADD DATE TIME  : '                       32960099
329700                      ADD-DT-TM              OF MFS-W92-A999      32970099
329800                 UPON CONSOLE                                     32980099
329900              DISPLAY '*****************************************' 32990099
330000                 UPON CONSOLE                                     33000099
330100              CALL SR0002                                         33010099
330200     END-EVALUATE.                                                33020099
330300                                                                  33030099
330400                                                                  33040099
330500 7400-PREPARE-W92-RECORD.                                         33050099
330600                                                                  33060099
330700     IF WS-INSERT                                                 33070099
330800        INITIALIZE MFS-W92-A999                                   33080099
330900        MOVE FUND-CODE                  OF 100-1042S-RPT-INFO-REC 33090099
331000          TO FUND-CODE                  OF MFS-W92-A999           33100099
330600             WS-SAVE-FUND-CODE                                    33060001
331100        MOVE ACCOUNT-NUMBER             OF 100-1042S-RPT-INFO-REC 33110099
331200          TO ACCOUNT-NUMBER             OF MFS-W92-A999           33120099
330900             WS-SAVE-ACCOUNT-NUMBER                               33090001
331300        MOVE TAX-YR-DT                  OF 100-1042S-RPT-INFO-REC 33130099
331400          TO TAX-YR-DT                  OF MFS-W92-A999           33140099
331020             WS-SAVE-TAX-YR-DT                                    33102001
331500        MOVE ACCUMULATION-TYPE-CD       OF 100-1042S-RPT-INFO-REC 33150099
331600          TO ACCUMULATION-TYPE-CD       OF MFS-W92-A999           33160099
331050             WS-SAVE-ACCUMULATION-TYPE-CD                         33105001
331700        MOVE MFA-1042S-RPT-ITEM-ID      OF MFS-W90-A999           33170099
331800          TO MFA-1042S-RPT-ITEM-ID      OF MFS-W92-A999           33180099
331080             WS-SAVE-MFA-1042S-RPT-ITEM-ID                        33108001
331900        MOVE PARM-TIMESTAMP             OF PSR0622                33190099
332000          TO ADD-DT-TM                  OF MFS-W92-A999           33200099
331200             WS-SAVE-ADD-DT-TM                                    33120001
332100        MOVE PAYEE-LINE-1-NM            OF 100-1042S-RPT-INFO-REC 33210099
332200          TO PAYEE-LINE-1-NM            OF MFS-W92-A999           33220099
332300        MOVE PAYEE-LINE-2-NM            OF 100-1042S-RPT-INFO-REC 33230099
332400          TO PAYEE-LINE-2-NM            OF MFS-W92-A999           33240099
332500        MOVE PAYEE-ADDRESS-1-TX         OF 100-1042S-RPT-INFO-REC 33250099
332600          TO PAYEE-ADDRESS-1-TX         OF MFS-W92-A999           33260099
332700        MOVE PAYEE-CITY-NM              OF 100-1042S-RPT-INFO-REC 33270099
332800          TO PAYEE-CITY-NM              OF MFS-W92-A999           33280099
332900        MOVE PAYEE-STATE-CD             OF 100-1042S-RPT-INFO-REC 33290099
333000          TO PAYEE-STATE-CD             OF MFS-W92-A999           33300099
333100        MOVE PAYEE-CAN-PVN-CD           OF 100-1042S-RPT-INFO-REC 33310099
333200          TO PAYEE-CAN-PVN-CD           OF MFS-W92-A999           33320099
333300        MOVE PYE-ADR-US-IRS-CD          OF 100-1042S-RPT-INFO-REC 33330099
333400          TO PYE-ADR-US-IRS-CD          OF MFS-W92-A999           33340099
333500        MOVE PAYEE-POSTAL-CD            OF 100-1042S-RPT-INFO-REC 33350099
333600          TO PAYEE-POSTAL-CD            OF MFS-W92-A999           33360099
333700        MOVE ACCOUNT-TYPE-CD            OF 100-1042S-RPT-INFO-REC 33370099
333800          TO ACCOUNT-TYPE-CD            OF MFS-W92-A999           33380099
333900        MOVE NQI-LINE-1-NM              OF 100-1042S-RPT-INFO-REC 33390099
334000          TO NQI-LINE-1-NM              OF MFS-W92-A999           33400099
334100        MOVE NQI-LINE-2-NM              OF 100-1042S-RPT-INFO-REC 33410099
334200          TO NQI-LINE-2-NM              OF MFS-W92-A999           33420099
334300        MOVE NQI-LINE-3-NM              OF 100-1042S-RPT-INFO-REC 33430099
334400          TO NQI-LINE-3-NM              OF MFS-W92-A999           33440099
334500        MOVE NQI-ADR-LINE-1-TX          OF 100-1042S-RPT-INFO-REC 33450099
334600          TO NQI-ADR-LINE-1-TX          OF MFS-W92-A999           33460099
334700        MOVE NQI-ADR-LINE-2-TX          OF 100-1042S-RPT-INFO-REC 33470099
334800          TO NQI-ADR-LINE-2-TX          OF MFS-W92-A999           33480099
334900        MOVE NQI-CITY-NM                OF 100-1042S-RPT-INFO-REC 33490099
335000          TO NQI-CITY-NM                OF MFS-W92-A999           33500099
335100        MOVE NQI-CAN-PVN-CD             OF 100-1042S-RPT-INFO-REC 33510099
335200          TO NQI-CAN-PVN-CD             OF MFS-W92-A999           33520099
335300        MOVE NQI-US-IRS-CD              OF 100-1042S-RPT-INFO-REC 33530099
335400          TO NQI-US-IRS-CD              OF MFS-W92-A999           33540099
335500        MOVE NQI-ZIP-CD                 OF 100-1042S-RPT-INFO-REC 33550099
335600          TO NQI-ZIP-CD                 OF MFS-W92-A999           33560099
335700        MOVE NQI-RPT-TAX-ID             OF 100-1042S-RPT-INFO-REC 33570099
335800          TO NQI-RPT-TAX-ID             OF MFS-W92-A999           33580099
335900        MOVE PAYER-TAX-ID               OF 100-1042S-RPT-INFO-REC 33590099
336000          TO PAYER-TAX-ID               OF MFS-W92-A999           33600099
336100        MOVE PAYER-NM                   OF 100-1042S-RPT-INFO-REC 33610099
336200          TO PAYER-NM                   OF MFS-W92-A999           33620099
336300        MOVE RECIPIENT-TYPE-CD          OF 100-1042S-RPT-INFO-REC 33630099
336400          TO RECIPIENT-TYPE-CD          OF MFS-W92-A999           33640099
336500     ELSE                                                         33650099
336600        MOVE FUND-CODE                  OF WS-CURR-W92-REC        33660099
336700          TO FUND-CODE                  OF MFS-W92-A999           33670099
336800        MOVE ACCOUNT-NUMBER             OF WS-CURR-W92-REC        33680099
336900          TO ACCOUNT-NUMBER             OF MFS-W92-A999           33690099
337000        MOVE TAX-YR-DT                  OF WS-CURR-W92-REC        33700099
337100          TO TAX-YR-DT                  OF MFS-W92-A999           33710099
337200        MOVE ACCUMULATION-TYPE-CD       OF WS-CURR-W92-REC        33720099
337300          TO ACCUMULATION-TYPE-CD       OF MFS-W92-A999           33730099
337400        MOVE MFA-1042S-RPT-ITEM-ID      OF WS-CURR-W92-REC        33740099
337500          TO MFA-1042S-RPT-ITEM-ID      OF MFS-W92-A999           33750099
337600        MOVE ADD-DT-TM                  OF WS-CURR-W92-REC        33760099
337700          TO ADD-DT-TM                  OF MFS-W92-A999           33770099
337800     END-IF.                                                      33780099
337900                                                                  33790099
338000     IF WS-STATUS-0                                               33800099
338100        MOVE SPACE                                                33810099
338200          TO REPORTING-STATUS-DT        OF MFS-W92-A999           33820099
338300         SET REPORTING-STATUS-DT-NY     OF MFS-W92-A999           33830099
338400          TO TRUE                                                 33840099
338500     ELSE                                                         33850099
338600        MOVE WS-CURRENT-DATE                                      33860099
338700          TO REPORTING-STATUS-DT        OF MFS-W92-A999           33870099
338800         SET REPORTING-STATUS-DT-NN     OF MFS-W92-A999           33880099
338900          TO TRUE                                                 33890099
339000     END-IF.                                                      33900099
339100                                                                  33910099
339200     MOVE WS-JOB-ID                                               33920099
339300       TO ADD-JOB-ID                    OF MFS-W92-A999.          33930099
339400     MOVE PARM-TIMESTAMP                OF PSR0622                33940099
339500       TO LAST-MNT-DATE-TIME            OF MFS-W92-A999.          33950099
339600     MOVE WS-B27935                                               33960099
339700       TO LAST-MNT-OPID                 OF MFS-W92-A999.          33970099
339800                                                                  33980099
339900     IF WS-STATUS-3                                               33990099
340000       MOVE ZEROES                                                34000099
340100         TO GROSS-INCOME-AT             OF MFS-W92-A999           34010099
340200            TAX-WITHHOLDING-AT          OF MFS-W92-A999           34020099
340300     ELSE                                                         34030099
340400       MOVE GROSS-INCOME-AT             OF 100-1042S-RPT-INFO-REC 34040099
340500         TO GROSS-INCOME-AT             OF MFS-W92-A999           34050099
340600       MOVE TAX-WITHHOLDING-AT          OF 100-1042S-RPT-INFO-REC 34060099
340700         TO TAX-WITHHOLDING-AT          OF MFS-W92-A999           34070099
340800     END-IF.                                                      34080099
340900                                                                  34090099
341000     MOVE TAX-RSP-GIIN-EXTERNAL-ID      OF 100-1042S-RPT-INFO-REC 34100099
341100       TO TAX-RSP-GIIN-EXTERNAL-ID      OF MFS-W92-A999.          34110099
341200     IF TAX-RSP-GIIN-EXTERNAL-ID        OF 100-1042S-RPT-INFO-REC 34120099
341300                                        = SPACE                   34130099
341400        SET TAX-RSP-GIIN-EXTERNAL-ID-NY OF MFS-W92-A999 TO TRUE   34140099
341500     ELSE                                                         34150099
341600        SET TAX-RSP-GIIN-EXTERNAL-ID-NN OF MFS-W92-A999 TO TRUE   34160099
341700     END-IF.                                                      34170099
341800                                                                  34180099
341900     PERFORM 7850-GET-AMENDMENT.                                  34190099
342000                                                                  34200099
342100     MOVE WS-STATUS-CODE                                          34210099
342200       TO REPORTING-STATUS-CD           OF MFS-W92-A999.          34220099
342300                                                                  34230099
342400     MOVE NQI-EIN-ID                    OF 100-1042S-RPT-INFO-REC 34240099
342500       TO NQI-EIN-ID                    OF MFS-W92-A999.          34250099
342600                                                                  34260099
342700     MOVE NQI-GIIN-EXTERNAL-ID          OF 100-1042S-RPT-INFO-REC 34270099
342800       TO NQI-GIIN-EXTERNAL-ID          OF MFS-W92-A999.          34280099
342900     IF NQI-GIIN-EXTERNAL-ID            OF 100-1042S-RPT-INFO-REC 34290099
343000                                        = SPACE                   34300099
343100        SET NQI-GIIN-EXTERNAL-ID-NY     OF MFS-W92-A999 TO TRUE   34310099
343200     ELSE                                                         34320099
343300        SET NQI-GIIN-EXTERNAL-ID-NN     OF MFS-W92-A999 TO TRUE   34330099
343400     END-IF.                                                      34340099
343500                                                                  34350099
343600     MOVE NQI-STATE-COUNTRY-CD          OF 100-1042S-RPT-INFO-REC 34360099
343700       TO NQI-STATE-COUNTRY-CD          OF MFS-W92-A999.          34370099
343800     IF NQI-STATE-COUNTRY-CD            OF 100-1042S-RPT-INFO-REC 34380099
343900                                        = ZERO                    34390099
344000        SET NQI-STATE-COUNTRY-CD-NY     OF MFS-W92-A999  TO TRUE  34400099
344100     ELSE                                                         34410099
344200        SET NQI-STATE-COUNTRY-CD-NN     OF MFS-W92-A999  TO TRUE  34420099
344300     END-IF.                                                      34430099
344400                                                                  34440099
344500     MOVE NQI-FOREIGN-TAX-ID            OF 100-1042S-RPT-INFO-REC 34450099
344600       TO NQI-FOREIGN-TAX-ID            OF MFS-W92-A999.          34460099
344700                                                                  34470099
344800     MOVE TAX-RSP-FOREIGN-TAX-ID        OF 100-1042S-RPT-INFO-REC 34480099
344900       TO TAX-RSP-FOREIGN-TAX-ID        OF MFS-W92-A999.          34490099
345000     IF TAX-RSP-FOREIGN-TAX-ID          OF 100-1042S-RPT-INFO-REC 34500099
345100                                        = SPACE                   34510099
345200        SET TAX-RSP-FOREIGN-TAX-ID-NY   OF MFS-W92-A999 TO TRUE   34520099
345300     ELSE                                                         34530099
345400        SET TAX-RSP-FOREIGN-TAX-ID-NN   OF MFS-W92-A999 TO TRUE   34540099
345500     END-IF.                                                      34550099
345600                                                                  34560099
345700     MOVE TAX-RSP-BIRTH-DT              OF 100-1042S-RPT-INFO-REC 34570099
345800       TO TAX-RSP-BIRTH-DT              OF MFS-W92-A999.          34580099
345900     IF TAX-RSP-BIRTH-DT                OF 100-1042S-RPT-INFO-REC 34590099
346000                                        = SPACES                  34600099
346100        SET TAX-RSP-BIRTH-DT-NY         OF MFS-W92-A999 TO TRUE   34610099
346200     ELSE                                                         34620099
346300        SET TAX-RSP-BIRTH-DT-NN         OF MFS-W92-A999 TO TRUE   34630099
346400     END-IF.                                                      34640099
346500                                                                  34650099
346600     MOVE NQI-CH3-STA-CODE-TYPE-ID      OF 100-1042S-RPT-INFO-REC 34660099
346700       TO NQI-CH3-STA-CODE-TYPE-ID      OF MFS-W92-A999.          34670099
346800     IF NQI-CH3-STA-CODE-TYPE-ID        OF 100-1042S-RPT-INFO-REC 34680099
346900                                        = ZERO                    34690099
347000        SET NQI-CH3-STA-CODE-TYPE-ID-NY OF MFS-W92-A999 TO TRUE   34700099
347100     ELSE                                                         34710099
347200        SET NQI-CH3-STA-CODE-TYPE-ID-NN OF MFS-W92-A999 TO TRUE   34720099
347300     END-IF.                                                      34730099
347400                                                                  34740099
347500     MOVE NQI-CH3-STA-CODE-ID           OF 100-1042S-RPT-INFO-REC 34750099
347600       TO NQI-CH3-STA-CODE-ID           OF MFS-W92-A999.          34760099
347700     IF NQI-CH3-STA-CODE-ID             OF 100-1042S-RPT-INFO-REC 34770099
347800                                        = SPACES                  34780099
347900        SET NQI-CH3-STA-CODE-ID-NY      OF MFS-W92-A999 TO TRUE   34790099
348000     ELSE                                                         34800099
348100        SET NQI-CH3-STA-CODE-ID-NN      OF MFS-W92-A999 TO TRUE   34810099
348200     END-IF.                                                      34820099
348300                                                                  34830099
348400     MOVE NQI-CH4-STA-CODE-TYPE-ID      OF 100-1042S-RPT-INFO-REC 34840099
348500       TO NQI-CH4-STA-CODE-TYPE-ID      OF MFS-W92-A999.          34850099
348600     IF NQI-CH4-STA-CODE-TYPE-ID        OF 100-1042S-RPT-INFO-REC 34860099
348700                                        = ZERO                    34870099
348800        SET NQI-CH4-STA-CODE-TYPE-ID-NY OF MFS-W92-A999 TO TRUE   34880099
348900     ELSE                                                         34890099
349000        SET NQI-CH4-STA-CODE-TYPE-ID-NN OF MFS-W92-A999 TO TRUE   34900099
349100     END-IF.                                                      34910099
349200                                                                  34920099
349300     MOVE NQI-CH4-STA-CODE-ID           OF 100-1042S-RPT-INFO-REC 34930099
349400       TO NQI-CH4-STA-CODE-ID           OF MFS-W92-A999.          34940099
349500     IF NQI-CH4-STA-CODE-ID             OF 100-1042S-RPT-INFO-REC 34950099
349600                                        = SPACES                  34960099
349700        SET NQI-CH4-STA-CODE-ID-NY      OF MFS-W92-A999 TO TRUE   34970099
349800     ELSE                                                         34980099
349900        SET NQI-CH4-STA-CODE-ID-NN      OF MFS-W92-A999 TO TRUE   34990099
350000     END-IF.                                                      35000099
350100                                                                  35010099
350200     IF ACCUMULATION-TYPE-DEALER     OF MFS-W92-A999              35020099
350300     OR ACCUMULATION-TYPE-NON-DEALER OF MFS-W92-A999              35030099
350400        SET WS-STATUS-0 TO TRUE                                   35040099
350500        MOVE WS-STATUS-CODE                                       35050099
350600          TO REPORTING-STATUS-CD     OF MFS-W92-A999              35060099
350700        MOVE SPACE                                                35070099
350800          TO REPORTING-STATUS-DT     OF MFS-W92-A999              35080099
350900         SET REPORTING-STATUS-DT-NY  OF MFS-W92-A999              35090099
351000          TO TRUE                                                 35100099
351100     END-IF.                                                      35110099
351200                                                                  35120099
351300 7450-UPDATE-W92-NQI.                                             35130099
351400                                                                  35140099
351500     EXEC SQL                                                     35150099
351600       UPDATE W92_A999                                            35160099
351700        SET LAST_MNT_OPID                                         35170099
351800              = :MFS-W92-A999.LAST-MNT-OPID                       35180099
351900            ,LAST_MNT_DATE_TIME                                   35190099
352000              = :MFS-W92-A999.LAST-MNT-DATE-TIME                  35200099
352100            ,NQI_EIN_ID                                           35210099
352200              = :MFS-W92-A999.NQI-EIN-ID                          35220099
352300            ,NQI_GIIN_EXTERNAL_ID                                 35230099
352400              = :MFS-W92-A999.NQI-GIIN-EXTERNAL-ID                35240099
352500               INDICATOR                                          35250099
352600                :MFS-W92-A999.NQI-GIIN-EXTERNAL-ID-NC             35260099
352700            ,NQI_STATE_COUNTRY_CD                                 35270099
352800              = :MFS-W92-A999.NQI-STATE-COUNTRY-CD                35280099
352900               INDICATOR                                          35290099
353000                :MFS-W92-A999.NQI-STATE-COUNTRY-CD-NC             35300099
353100            ,NQI_FOREIGN_TAX_ID                                   35310099
353200              = :MFS-W92-A999.NQI-FOREIGN-TAX-ID                  35320099
353300            ,NQI_CH3_STA_CODE_TYPE_ID                             35330099
353400              = :MFS-W92-A999.NQI-CH3-STA-CODE-TYPE-ID            35340099
353500               INDICATOR                                          35350099
353600                :MFS-W92-A999.NQI-CH3-STA-CODE-TYPE-ID-NC         35360099
353700            ,NQI_CH3_STA_CODE_ID                                  35370099
353800              = :MFS-W92-A999.NQI-CH3-STA-CODE-ID                 35380099
353900               INDICATOR                                          35390099
354000                :MFS-W92-A999.NQI-CH3-STA-CODE-ID-NC              35400099
354100            ,NQI_CH4_STA_CODE_TYPE_ID                             35410099
354200              = :MFS-W92-A999.NQI-CH4-STA-CODE-TYPE-ID            35420099
354300               INDICATOR                                          35430099
354400                :MFS-W92-A999.NQI-CH4-STA-CODE-TYPE-ID-NC         35440099
354500            ,NQI_CH4_STA_CODE_ID                                  35450099
354600              = :MFS-W92-A999.NQI-CH4-STA-CODE-ID                 35460099
354700               INDICATOR                                          35470099
354800                :MFS-W92-A999.NQI-CH4-STA-CODE-ID-NC              35480099
354900            ,ADD_JOB_ID                                           35490099
355000              = :MFS-W92-A999.ADD-JOB-ID                          35500099
355100       WHERE FUND_CODE                                            35510099
355200             = :MFS-W92-A999.FUND-CODE                            35520099
355300         AND ACCOUNT_NUMBER                                       35530099
355400             = :MFS-W92-A999.ACCOUNT-NUMBER                       35540099
355500         AND TAX_YR_DT                                            35550099
355600             = :MFS-W92-A999.TAX-YR-DT                            35560099
355700         AND ACCUMULATION_TYPE_CD                                 35570099
355800             = :MFS-W92-A999.ACCUMULATION-TYPE-CD                 35580099
355900         AND MFA_1042S_RPT_ITEM_ID                                35590099
356000             = :MFS-W92-A999.MFA-1042S-RPT-ITEM-ID                35600099
356100         AND ADD_DT_TM                                            35610099
356200             = :MFS-W92-A999.ADD-DT-TM                            35620099
356300     END-EXEC.                                                    35630099
356400                                                                  35640099
356500     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE   OF WS00575.           35650099
356600                                                                  35660099
356700     EVALUATE TRUE                                                35670099
356800         WHEN SQL-RETURN-SUCCESSFUL         OF WS00575            35680099
356900               ADD WS-ONE                   TO WS-W92-UPD-CNT     35690099
357000              MOVE 'W92A999'                                      35700099
357100                TO AUDIT-DATAVIEW-ID        OF PSR1184            35710099
357200              MOVE MFS-W92-A999                                   35720099
357300                TO AFTER-RECORD             OF PSR1184            35730099
357400              MOVE LENGTH                   OF MFS-W92-A999       35740099
357500                TO DATAVIEW-IMAGE-TXT-LEN   OF PSR1184            35750099
357600              PERFORM 8600-CALL-SR1184                            35760099
357700         WHEN OTHER                                               35770099
357800              DISPLAY '************ B27935 ABENDING ************' 35780099
357900                 UPON CONSOLE                                     35790099
358000              DISPLAY '* PARAGRAPH : 7450-UPDATE-W92-NQI       *' 35800099
358100                 UPON CONSOLE                                     35810099
358200              DISPLAY '* UNSUCCESSFUL UPDATE W92 TABLE         *' 35820099
358300                 UPON CONSOLE                                     35830099
358400              DISPLAY '* RETURN CODE    : '                       35840099
358500                      SQLSTATE-RETURN-CDE    OF WS00575           35850099
358600                 UPON CONSOLE                                     35860099
358700              DISPLAY '* FUND CODE      : '                       35870099
358800                      FUND-CODE              OF MFS-W92-A999      35880099
358900                 UPON CONSOLE                                     35890099
359000              DISPLAY '* ACCOUNT NUMBER : '                       35900099
359100                      ACCOUNT-NUMBER         OF MFS-W92-A999      35910099
359200                 UPON CONSOLE                                     35920099
359300              DISPLAY '* TAX YEAR       : '                       35930099
359400                      TAX-YR-DT              OF MFS-W92-A999      35940099
359500                 UPON CONSOLE                                     35950099
359600              DISPLAY '* ACCUMULATION CD:'                        35960099
359700                      ACCUMULATION-TYPE-CD   OF MFS-W92-A999      35970099
359800                 UPON CONSOLE                                     35980099
359900              DISPLAY '* ITEM ID        : '                       35990099
360000                      MFA-1042S-RPT-ITEM-ID  OF MFS-W92-A999      36000099
360100                 UPON CONSOLE                                     36010099
360200              DISPLAY '* ADD DATE TIME  : '                       36020099
360300                      ADD-DT-TM              OF MFS-W92-A999      36030099
360400                 UPON CONSOLE                                     36040099
360500              DISPLAY '*****************************************' 36050099
360600                 UPON CONSOLE                                     36060099
360700              CALL SR0002                                         36070099
360800     END-EVALUATE.                                                36080099
360900                                                                  36090099
361000                                                                  36100099
361100 7500-INSERT-W92-RECORD.                                          36110099
361200                                                                  36120099
361300     EXEC SQL                                                     36130099
361400          INSERT INTO W92_A999                                    36140099
361500            (                                                     36150099
361600                FUND_CODE                                         36160099
361700               ,ACCOUNT_NUMBER                                    36170099
361800               ,TAX_YR_DT                                         36180099
361900               ,ACCUMULATION_TYPE_CD                              36190099
362000               ,MFA_1042S_RPT_ITEM_ID                             36200099
362100               ,ADD_DT_TM                                         36210099
362200               ,LAST_MNT_OPID                                     36220099
362300               ,LAST_MNT_DATE_TIME                                36230099
362400               ,GROSS_INCOME_AT                                   36240099
362500               ,TAX_WITHHOLDING_AT                                36250099
362600               ,TAX_RSP_GIIN_EXTERNAL_ID                          36260099
362700               ,REPORTING_STATUS_CD                               36270099
362800               ,REPORTING_STATUS_DT                               36280099
362900               ,NQI_EIN_ID                                        36290099
363000               ,NQI_GIIN_EXTERNAL_ID                              36300099
363100               ,NQI_STATE_COUNTRY_CD                              36310099
363200               ,NQI_FOREIGN_TAX_ID                                36320099
363300               ,TAX_RSP_FOREIGN_TAX_ID                            36330099
363400               ,TAX_RSP_BIRTH_DT                                  36340099
363500               ,NQI_CH3_STA_CODE_TYPE_ID                          36350099
363600               ,NQI_CH3_STA_CODE_ID                               36360099
363700               ,NQI_CH4_STA_CODE_TYPE_ID                          36370099
363800               ,NQI_CH4_STA_CODE_ID                               36380099
363900               ,ADD_JOB_ID                                        36390099
364000               ,PAYEE_LINE_1_NM                                   36400099
364100               ,PAYEE_LINE_2_NM                                   36410099
364200               ,PAYEE_ADDRESS_1_TX                                36420099
364300               ,PAYEE_CITY_NM                                     36430099
364400               ,PAYEE_STATE_CD                                    36440099
364500               ,PAYEE_CAN_PVN_CD                                  36450099
364600               ,PYE_ADR_US_IRS_CD                                 36460099
364700               ,PAYEE_POSTAL_CD                                   36470099
364800               ,ACCOUNT_TYPE_CD                                   36480099
364900               ,NQI_LINE_1_NM                                     36490099
365000               ,NQI_LINE_2_NM                                     36500099
365100               ,NQI_LINE_3_NM                                     36510099
365200               ,NQI_ADR_LINE_1_TX                                 36520099
365300               ,NQI_ADR_LINE_2_TX                                 36530099
365400               ,NQI_CITY_NM                                       36540099
365500               ,NQI_CAN_PVN_CD                                    36550099
365600               ,NQI_US_IRS_CD                                     36560099
365700               ,NQI_ZIP_CD                                        36570099
365800               ,NQI_RPT_TAX_ID                                    36580099
365900               ,PAYER_TAX_ID                                      36590099
366000               ,PAYER_NM                                          36600099
366100               ,RECIPIENT_TYPE_CD                                 36610099
366200               ,AMENDMENT_NBR                                     36620099
366300            )                                                     36630099
366400          VALUES                                                  36640099
366500            (                                                     36650099
366600                :MFS-W92-A999.FUND-CODE                           36660099
366700               ,:MFS-W92-A999.ACCOUNT-NUMBER                      36670099
366800               ,:MFS-W92-A999.TAX-YR-DT                           36680099
366900               ,:MFS-W92-A999.ACCUMULATION-TYPE-CD                36690099
367000               ,:MFS-W92-A999.MFA-1042S-RPT-ITEM-ID               36700099
367100               ,:MFS-W92-A999.ADD-DT-TM                           36710099
367200               ,:MFS-W92-A999.LAST-MNT-OPID                       36720099
367300               ,:MFS-W92-A999.LAST-MNT-DATE-TIME                  36730099
367400               ,:MFS-W92-A999.GROSS-INCOME-AT                     36740099
367500               ,:MFS-W92-A999.TAX-WITHHOLDING-AT                  36750099
367600               ,:MFS-W92-A999.TAX-RSP-GIIN-EXTERNAL-ID            36760099
367700                  INDICATOR                                       36770099
367800                :MFS-W92-A999.TAX-RSP-GIIN-EXTERNAL-ID-NC         36780099
367900               ,:MFS-W92-A999.REPORTING-STATUS-CD                 36790099
368000               ,:MFS-W92-A999.REPORTING-STATUS-DT                 36800099
368100                  INDICATOR                                       36810099
368200                :MFS-W92-A999.REPORTING-STATUS-DT-NC              36820099
368300               ,:MFS-W92-A999.NQI-EIN-ID                          36830099
368400               ,:MFS-W92-A999.NQI-GIIN-EXTERNAL-ID                36840099
368500                  INDICATOR                                       36850099
368600                :MFS-W92-A999.NQI-GIIN-EXTERNAL-ID-NC             36860099
368700               ,:MFS-W92-A999.NQI-STATE-COUNTRY-CD                36870099
368800                  INDICATOR                                       36880099
368900                :MFS-W92-A999.NQI-STATE-COUNTRY-CD-NC             36890099
369000               ,:MFS-W92-A999.NQI-FOREIGN-TAX-ID                  36900099
369100               ,:MFS-W92-A999.TAX-RSP-FOREIGN-TAX-ID              36910099
369200                  INDICATOR                                       36920099
369300                :MFS-W92-A999.TAX-RSP-FOREIGN-TAX-ID-NC           36930099
369400               ,:MFS-W92-A999.TAX-RSP-BIRTH-DT                    36940099
369500                  INDICATOR                                       36950099
369600                :MFS-W92-A999.TAX-RSP-BIRTH-DT-NC                 36960099
369700               ,:MFS-W92-A999.NQI-CH3-STA-CODE-TYPE-ID            36970099
369800                  INDICATOR                                       36980099
369900                :MFS-W92-A999.NQI-CH3-STA-CODE-TYPE-ID-NC         36990099
370000               ,:MFS-W92-A999.NQI-CH3-STA-CODE-ID                 37000099
370100                  INDICATOR                                       37010099
370200                :MFS-W92-A999.NQI-CH3-STA-CODE-ID-NC              37020099
370300               ,:MFS-W92-A999.NQI-CH4-STA-CODE-TYPE-ID            37030099
370400                  INDICATOR                                       37040099
370500                :MFS-W92-A999.NQI-CH4-STA-CODE-TYPE-ID-NC         37050099
370600               ,:MFS-W92-A999.NQI-CH4-STA-CODE-ID                 37060099
370700                  INDICATOR                                       37070099
370800                :MFS-W92-A999.NQI-CH4-STA-CODE-ID-NC              37080099
370900               ,:MFS-W92-A999.ADD-JOB-ID                          37090099
371000               ,:MFS-W92-A999.PAYEE-LINE-1-NM                     37100099
371100               ,:MFS-W92-A999.PAYEE-LINE-2-NM                     37110099
371200               ,:MFS-W92-A999.PAYEE-ADDRESS-1-TX                  37120099
371300               ,:MFS-W92-A999.PAYEE-CITY-NM                       37130099
371400               ,:MFS-W92-A999.PAYEE-STATE-CD                      37140099
371500               ,:MFS-W92-A999.PAYEE-CAN-PVN-CD                    37150099
371600               ,:MFS-W92-A999.PYE-ADR-US-IRS-CD                   37160099
371700               ,:MFS-W92-A999.PAYEE-POSTAL-CD                     37170099
371800               ,:MFS-W92-A999.ACCOUNT-TYPE-CD                     37180099
371900               ,:MFS-W92-A999.NQI-LINE-1-NM                       37190099
372000               ,:MFS-W92-A999.NQI-LINE-2-NM                       37200099
372100               ,:MFS-W92-A999.NQI-LINE-3-NM                       37210099
372200               ,:MFS-W92-A999.NQI-ADR-LINE-1-TX                   37220099
372300               ,:MFS-W92-A999.NQI-ADR-LINE-2-TX                   37230099
372400               ,:MFS-W92-A999.NQI-CITY-NM                         37240099
372500               ,:MFS-W92-A999.NQI-CAN-PVN-CD                      37250099
372600               ,:MFS-W92-A999.NQI-US-IRS-CD                       37260099
372700               ,:MFS-W92-A999.NQI-ZIP-CD                          37270099
372800               ,:MFS-W92-A999.NQI-RPT-TAX-ID                      37280099
372900               ,:MFS-W92-A999.PAYER-TAX-ID                        37290099
373000               ,:MFS-W92-A999.PAYER-NM                            37300099
373100               ,:MFS-W92-A999.RECIPIENT-TYPE-CD                   37310099
373200               ,:MFS-W92-A999.AMENDMENT-NBR                       37320099
373300            )                                                     37330099
373400     END-EXEC.                                                    37340099
373500                                                                  37350099
373600     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE OF WS00575.             37360099
373700                                                                  37370099
373800     EVALUATE TRUE                                                37380099
373900       WHEN SQL-RETURN-SUCCESSFUL         OF WS00575              37390099
374000            ADD WS-ONE                    TO WS-W92-ADD-CNT       37400099
374100            MOVE 'W92A999'                                        37410099
374200              TO AUDIT-DATAVIEW-ID        OF PSR1184              37420099
374300            MOVE MFS-W92-A999                                     37430099
374400              TO AFTER-RECORD             OF PSR1184              37440099
374500            MOVE LENGTH                   OF MFS-W92-A999         37450099
374600              TO DATAVIEW-IMAGE-TXT-LEN   OF PSR1184              37460099
374700            PERFORM 8600-CALL-SR1184                              37470099
374800       WHEN OTHER                                                 37480099
374900            DISPLAY '************ B27935 ABENDING ************'   37490099
375000               UPON CONSOLE                                       37500099
375100            DISPLAY '* PARAGRAPH : 7500-INSERT-W92-RECORD    *'   37510099
375200               UPON CONSOLE                                       37520099
375300            DISPLAY '* UNSUCCESSFUL INSERT W92 TABLE         *'   37530099
375400               UPON CONSOLE                                       37540099
375500            DISPLAY '* RETURN CODE    : '                         37550099
375600                    SQLSTATE-RETURN-CDE    OF WS00575             37560099
375700               UPON CONSOLE                                       37570099
375800            DISPLAY '*****************************************'   37580099
375900               UPON CONSOLE                                       37590099
376000            CALL SR0002                                           37600099
376100     END-EVALUATE.                                                37610099
376200                                                                  37620099
376300                                                                  37630099
376400 7550-DELETE-W90.                                                 37640099
376500                                                                  37650099
376600     EXEC SQL                                                     37660099
376700          DELETE FROM W90_A999                                    37670099
376800           WHERE FUND_CODE                                        37680099
376900                 = :MFS-W90-A999.FUND-CODE                        37690099
377000             AND ACCOUNT_NUMBER                                   37700099
377100                 = :MFS-W90-A999.ACCOUNT-NUMBER                   37710099
377200             AND TAX_YR_DT                                        37720099
377300                 = :MFS-W90-A999.TAX-YR-DT                        37730099
377400             AND ACCUMULATION_TYPE_CD                             37740099
377500                 = :MFS-W90-A999.ACCUMULATION-TYPE-CD             37750099
377600             AND MFA_1042S_RPT_ITEM_ID                            37760099
377700                 = :MFS-W90-A999.MFA-1042S-RPT-ITEM-ID            37770099
377800     END-EXEC.                                                    37780099
377900                                                                  37790099
378000     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE OF WS00575.             37800099
378100                                                                  37810099
378200     EVALUATE TRUE                                                37820099
378300         WHEN SQL-RETURN-SUCCESSFUL       OF WS00575              37830099
378400              ADD WS-ONE                  TO WS-W90-DEL-CNT       37840099
378500              MOVE 'W90A999'                                      37850099
378600                TO AUDIT-DATAVIEW-ID      OF PSR1184              37860099
378700              MOVE LENGTH                 OF MFS-W90-A999         37870099
378800                TO DATAVIEW-IMAGE-TXT-LEN OF PSR1184              37880099
378900              PERFORM 8600-CALL-SR1184                            37890099
379000         WHEN SQL-RETURN-NOT-FOUND        OF WS00575              37900099
379100              CONTINUE                                            37910099
379200         WHEN OTHER                                               37920099
379300              DISPLAY '************ B27935 ABENDING ************' 37930099
379400                 UPON CONSOLE                                     37940099
379500              DISPLAY '* PARAGRAPH : 7550-DELETE-W90           *' 37950099
379600                 UPON CONSOLE                                     37960099
379700              DISPLAY '* UNSUCCESSFUL DELETE W90 TABLE         *' 37970099
379800                 UPON CONSOLE                                     37980099
379900              DISPLAY '* RETURN CODE    : '                       37990099
380000                      SQLSTATE-RETURN-CDE    OF WS00575           38000099
380100                 UPON CONSOLE                                     38010099
380200              DISPLAY '* FUND CODE      : '                       38020099
380300                      FUND-CODE              OF MFS-W90-A999      38030099
380400                 UPON CONSOLE                                     38040099
380500              DISPLAY '* ACCOUNT NUMBER : '                       38050099
380600                      ACCOUNT-NUMBER         OF MFS-W90-A999      38060099
380700                 UPON CONSOLE                                     38070099
380800              DISPLAY '* TAX YEAR       : '                       38080099
380900                      TAX-YR-DT              OF MFS-W90-A999      38090099
381000                 UPON CONSOLE                                     38100099
381100              DISPLAY '* ACCUMULATION CD:'                        38110099
381200                      ACCUMULATION-TYPE-CD   OF MFS-W90-A999      38120099
381300                 UPON CONSOLE                                     38130099
381400              DISPLAY '* ITEM ID        : '                       38140099
381500                      MFA-1042S-RPT-ITEM-ID  OF MFS-W90-A999      38150099
381600                 UPON CONSOLE                                     38160099
381700              DISPLAY '*****************************************' 38170099
381800                 UPON CONSOLE                                     38180099
381900              CALL SR0002                                         38190099
382000     END-EVALUATE.                                                38200099
382100                                                                  38210099
382200                                                                  38220099
382300 7600-SELECT-STATUS-EXIST.                                        38230099
382400                                                                  38240099
382500     MOVE FUND-CODE                   OF 100-1042S-RPT-INFO-REC   38250099
382600       TO FUND-CODE                   OF MFS-W90-A999.            38260099
382700     MOVE ACCOUNT-NUMBER              OF 100-1042S-RPT-INFO-REC   38270099
382800       TO ACCOUNT-NUMBER              OF MFS-W90-A999.            38280099
382900     MOVE TAX-YR-DT                   OF 100-1042S-RPT-INFO-REC   38290099
383000       TO TAX-YR-DT                   OF MFS-W90-A999.            38300099
383100                                                                  38310099
383200     EXEC SQL                                                     38320099
383300          SELECT                                                  38330099
383400             W92.REPORTING_STATUS_CD                              38340099
383500            ,W90.UNIQUE_FORM_ID                                   38350099
383600             INTO :MFS-W92-A999.REPORTING-STATUS-CD               38360099
383700                 ,:MFS-W90-A999.UNIQUE-FORM-ID                    38370099
383800          FROM                                                    38380099
383900             W90_A999  AS W90                                     38390099
384000          INNER JOIN                                              38400099
384100             W92_A999  AS W92                                     38410099
384200           ON  W90.FUND_CODE                                      38420099
384300             = W92.FUND_CODE                                      38430099
384400           AND W90.ACCOUNT_NUMBER                                 38440099
384500             = W92.ACCOUNT_NUMBER                                 38450099
384600           AND W90.TAX_YR_DT                                      38460099
384700             = W92.TAX_YR_DT                                      38470099
384800           AND W90.ACCUMULATION_TYPE_CD                           38480099
384900             = W92.ACCUMULATION_TYPE_CD                           38490099
385000           AND W90.MFA_1042S_RPT_ITEM_ID                          38500099
385100             = W92.MFA_1042S_RPT_ITEM_ID                          38510099
385200          WHERE W90.FUND_CODE                                     38520099
385300                = :MFS-W90-A999.FUND-CODE                         38530099
385400            AND W90.ACCOUNT_NUMBER                                38540099
385500                = :MFS-W90-A999.ACCOUNT-NUMBER                    38550099
385600            AND W90.TAX_YR_DT                                     38560099
385700                = :MFS-W90-A999.TAX-YR-DT                         38570099
385800            AND W90.ACCUMULATION_TYPE_CD                          38580099
385900                = :MFS-W90-A999.ACCUMULATION-TYPE-CD              38590099
386000            AND W92.ADD_DT_TM                                     38600099
386100                = (SELECT                                         38610099
386200                          MAX(W92A.ADD_DT_TM)                     38620099
386300                     FROM                                         38630099
386400                          W92_A999 AS W92A                        38640099
386500                    WHERE                                         38650099
386600                          W92A.FUND_CODE                          38660099
386700                          = W92.FUND_CODE                         38670099
386800                      AND W92A.ACCOUNT_NUMBER                     38680099
386900                          = W92.ACCOUNT_NUMBER                    38690099
387000                      AND W92A.TAX_YR_DT                          38700099
387100                          = W92.TAX_YR_DT                         38710099
387200                      AND W92A.ACCUMULATION_TYPE_CD               38720099
387300                          = W92.ACCUMULATION_TYPE_CD              38730099
387400                      AND W92A.MFA_1042S_RPT_ITEM_ID              38740099
387500                          = W92.MFA_1042S_RPT_ITEM_ID)            38750099
387600          FETCH FIRST 1 ROW ONLY                                  38760099
387700     END-EXEC                                                     38770099
387800                                                                  38780099
387900     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE    OF WS00575.          38790099
388000                                                                  38800099
388100     EVALUATE TRUE                                                38810099
388200         WHEN SQL-RETURN-SUCCESSFUL          OF WS00575           38820099
388300              SET WS-STATUS-FOUND-YES        TO TRUE              38830099
388400         WHEN SQL-RETURN-NOT-FOUND           OF WS00575           38840099
388500              SET WS-STATUS-FOUND-NO         TO TRUE              38850099
388600         WHEN OTHER                                               38860099
388700              DISPLAY '************ B27935 ABENDING ************' 38870099
388800                 UPON CONSOLE                                     38880099
388900              DISPLAY '* PARAGRAPH : 7600-SELECT-STATUS-EXIST   *'38890099
389000                 UPON CONSOLE                                     38900099
389100              DISPLAY '* UNSUCCESSFUL SELECT W90/W92 TABLE     *' 38910099
389200                 UPON CONSOLE                                     38920099
389300              DISPLAY '* RETURN CODE    : '                       38930099
389400                      SQLSTATE-RETURN-CDE    OF WS00575           38940099
389500                 UPON CONSOLE                                     38950099
389600              DISPLAY '* FUND CODE      : '                       38960099
389700                      FUND-CODE              OF MFS-W90-A999      38970099
389800                 UPON CONSOLE                                     38980099
389900              DISPLAY '* ACCOUNT NUMBER : '                       38990099
390000                      ACCOUNT-NUMBER         OF MFS-W90-A999      39000099
390100                 UPON CONSOLE                                     39010099
390200              DISPLAY '* TAX YEAR       : '                       39020099
390300                      TAX-YR-DT              OF MFS-W90-A999      39030099
390400              DISPLAY '* ACCUMULATION TYPE: '                     39040099
390500                      ACCUMULATION-TYPE-CD   OF MFS-W90-A999      39050099
390600                 UPON CONSOLE                                     39060099
390700              DISPLAY '*****************************************' 39070099
390800                 UPON CONSOLE                                     39080099
390900              CALL SR0002                                         39090099
391000     END-EVALUATE.                                                39100099
391100                                                                  39110099
391200                                                                  39120099
391300 7700-CHECK-PRIOR-SSN.                                            39130099
391400                                                                  39140099
391500     IF WS-CHECK-TWO-STEP-RPT-YES                                 39150099
391600        SET  REPORTING-STATUS-CORR-PRODUCED OF MFS-W92-A999       39160099
391700                                            TO TRUE               39170099
391800        PERFORM 8400-SELECT-TWO-STEP-SSN                          39180099
391900        IF  WS-SSN-FOUND-YES                                      39190099
392000            SET WS-STATUS-4-EXIST-YES       TO TRUE               39200099
392100            MOVE TAX-RSP-TAX-ID             OF MFS-W90-A999       39210099
392200              TO WS-NEW-SSN-STA-4                                 39220099
392300        ELSE                                                      39230099
392400            SET WS-STATUS-4-EXIST-NO        TO TRUE               39240099
392500        END-IF                                                    39250099
392600                                                                  39260099
392700        SET REPORTING-STATUS-ZERO-CORR-PRD  OF MFS-W92-A999       39270099
392800                                            TO TRUE               39280099
392900        PERFORM 8400-SELECT-TWO-STEP-SSN                          39290099
393000        IF  WS-SSN-FOUND-YES                                      39300099
393100            SET WS-STATUS-5-EXIST-YES       TO TRUE               39310099
393200            MOVE TAX-RSP-TAX-ID             OF MFS-W90-A999       39320099
393300              TO WS-OLD-SSN-STA-5                                 39330099
393400        ELSE                                                      39340099
393500            SET WS-STATUS-5-EXIST-NO        TO TRUE               39350099
393600        END-IF                                                    39360099
393700                                                                  39370099
393800        IF WS-STATUS-4-EXIST-YES    AND WS-STATUS-5-EXIST-YES     39380099
393900           IF WS-NEW-SSN-STA-4 = WS-OLD-SSN-STA-5                 39390099
394000              SET WS-TWO-STEP-NO             TO TRUE              39400099
394100           ELSE                                                   39410099
394200              SET WS-TWO-STEP-YES                                 39420099
394300                  WS-SSN-CHANGE-TWO-STEP-RPT TO TRUE              39430099
394400           END-IF                                                 39440099
394500           MOVE WS-NEW-SSN-STA-4                                  39450099
394600             TO WS-NEW-SSN                                        39460099
394700           MOVE WS-OLD-SSN-STA-5                                  39470099
394800             TO WS-OLD-SSN                                        39480099
394900        ELSE                                                      39490099
395000           IF WS-STATUS-2-EXIST-YES AND WS-STATUS-5-EXIST-YES     39500099
395100              IF (WS-NEW-SSN-STA-2 = WS-OLD-SSN-STA-5)            39510099
395200                 SET WS-TWO-STEP-NO          TO TRUE              39520099
395300              ELSE                                                39530099
395400                 SET WS-TWO-STEP-YES         TO TRUE              39540099
395500              END-IF                                              39550099
395600              MOVE WS-NEW-SSN-STA-2                               39560099
395700                TO WS-NEW-SSN                                     39570099
395800              MOVE WS-OLD-SSN-STA-5                               39580099
395900                TO WS-OLD-SSN                                     39590099
396000           END-IF                                                 39600099
396100        END-IF                                                    39610099
396200     ELSE                                                         39620099
396300        SET  REPORTING-STATUS-CORR-REQUIRED OF MFS-W92-A999       39630099
396400                                            TO TRUE               39640099
396500        PERFORM 8400-SELECT-TWO-STEP-SSN                          39650099
396600        IF  WS-SSN-FOUND-YES                                      39660099
396700            SET WS-STATUS-2-EXIST-YES       TO TRUE               39670099
396800            MOVE TAX-RSP-TAX-ID             OF MFS-W90-A999       39680099
396900              TO WS-NEW-SSN-STA-2                                 39690099
397000        ELSE                                                      39700099
397100            SET WS-STATUS-2-EXIST-NO        TO TRUE               39710099
397200        END-IF                                                    39720099
397300                                                                  39730099
397400        SET REPORTING-STATUS-ZERO-REQUIRED  OF MFS-W92-A999       39740099
397500                                            TO TRUE               39750099
397600        PERFORM 8400-SELECT-TWO-STEP-SSN                          39760099
397700        IF  WS-SSN-FOUND-YES                                      39770099
397800            SET WS-STATUS-3-EXIST-YES       TO TRUE               39780099
397900            MOVE TAX-RSP-TAX-ID             OF MFS-W90-A999       39790099
398000              TO WS-OLD-SSN-STA-3                                 39800099
398100        ELSE                                                      39810099
398200            SET WS-STATUS-3-EXIST-NO        TO TRUE               39820099
398300        END-IF                                                    39830099
398400                                                                  39840099
398500        IF WS-STATUS-2-EXIST-YES AND WS-STATUS-3-EXIST-YES        39850099
398600           IF WS-NEW-SSN-STA-2 = WS-OLD-SSN-STA-3                 39860099
398700              SET WS-TWO-STEP-NO            TO TRUE               39870099
398800           ELSE                                                   39880099
398900              SET WS-TWO-STEP-YES                                 39890099
399000                  WS-SSN-CHANGE-TWO-STEP                          39900099
399100                  WS-CHANGED-SSN-YES        TO TRUE               39910099
399200           END-IF                                                 39920099
399300           MOVE WS-NEW-SSN-STA-2                                  39930099
399400             TO WS-NEW-SSN                                        39940099
399500           MOVE WS-OLD-SSN-STA-3                                  39950099
399600             TO WS-OLD-SSN                                        39960099
399700        END-IF                                                    39970099
399800     END-IF.                                                      39980099
399900                                                                  39990099
400000                                                                  40000099
400100 7740-SELECT-CURRENT-SSN.                                         40010099
400200                                                                  40020099
400300     EXEC SQL                                                     40030099
400400       SELECT                                                     40040099
400500             COALESCE(W90.TAX_RSP_TAX_ID,0)                       40050099
400600       INTO                                                       40060099
400700            :MFS-W90-A999.TAX-RSP-TAX-ID                          40070099
400800        FROM W90_A999        AS W90                               40080099
400900       WHERE W90.FUND_CODE                                        40090099
401000             = :MFS-W90-A999.FUND-CODE                            40100099
401100         AND W90.ACCOUNT_NUMBER                                   40110099
401200             = :MFS-W90-A999.ACCOUNT-NUMBER                       40120099
401300         AND W90.TAX_YR_DT                                        40130099
401400             = :MFS-W90-A999.TAX-YR-DT                            40140099
401700        ORDER BY W90.MFA_1042S_RPT_ITEM_ID DESC                   40170099
401800        FETCH FIRST 1 ROW ONLY                                    40180099
401900     END-EXEC.                                                    40190099
402000                                                                  40200099
402100     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE    OF WS00575.          40210099
402200                                                                  40220099
402300     EVALUATE TRUE                                                40230099
402400         WHEN SQL-RETURN-SUCCESSFUL          OF WS00575           40240099
402500              CONTINUE                                            40250099
402600         WHEN SQL-RETURN-NOT-FOUND           OF WS00575           40260099
402700              MOVE ZERO                                           40270099
402800                TO TAX-RSP-TAX-ID            OF MFS-W90-A999      40280099
402900         WHEN OTHER                                               40290099
403000              DISPLAY '************ B27935 ABENDING ************' 40300099
403100                 UPON CONSOLE                                     40310099
403200              DISPLAY '* PARAGRAPH : 7740-SELECT-CURRENT-SSN   *' 40320099
403300                 UPON CONSOLE                                     40330099
403400              DISPLAY '* UNSUCCESSFUL SELECT W90 TABLE         *' 40340099
403500                 UPON CONSOLE                                     40350099
403600              DISPLAY '* RETURN CODE    : '                       40360099
403700                      SQLSTATE-RETURN-CDE    OF WS00575           40370099
403800                 UPON CONSOLE                                     40380099
403900              DISPLAY '* FUND CODE      : '                       40390099
404000                      FUND-CODE              OF MFS-W90-A999      40400099
404100                 UPON CONSOLE                                     40410099
404200              DISPLAY '* ACCOUNT NUMBER : '                       40420099
404300                      ACCOUNT-NUMBER         OF MFS-W90-A999      40430099
404400                 UPON CONSOLE                                     40440099
404500              DISPLAY '* TAX YEAR       : '                       40450099
404600                      TAX-YR-DT              OF MFS-W90-A999      40460099
404700                 UPON CONSOLE                                     40470099
404800              DISPLAY '* ACCUMULATION TYPE : '                    40480099
404900                      ACCUMULATION-TYPE-CD   OF MFS-W90-A999      40490099
405000                 UPON CONSOLE                                     40500099
405100              DISPLAY '*****************************************' 40510099
405200                 UPON CONSOLE                                     40520099
405300              CALL SR0002                                         40530099
405400     END-EVALUATE.                                                40540099
405500                                                                  40550099
405600                                                                  40560099
405700 7800-INSERT-W90-RECORD.                                          40570099
405800                                                                  40580099
405900     EXEC SQL                                                     40590099
406000          INSERT INTO W90_A999                                    40600099
406100            (                                                     40610099
406200                FUND_CODE                                         40620099
406300               ,ACCOUNT_NUMBER                                    40630099
406400               ,TAX_YR_DT                                         40640099
406500               ,ACCUMULATION_TYPE_CD                              40650099
406600               ,MFA_1042S_RPT_ITEM_ID                             40660099
406700               ,LAST_MNT_OPID                                     40670099
406800               ,LAST_MNT_DATE_TIME                                40680099
406900               ,TAX_RSP_ST_CNY_CD                                 40690099
407000               ,INCOME_TYPE_CD                                    40700099
407100               ,TAX_RSP_TAX_ID                                    40710099
407200               ,CH3_TAX_RT                                        40720099
407300               ,CH4_TAX_RT                                        40730099
407400               ,CH3_WITHHOLDING_CD                                40740099
407500               ,CH4_WITHHOLDING_CD                                40750099
407600               ,CH3_EXEMPTION_CD                                  40760099
407700               ,CH4_EXEMPTION_CD                                  40770099
407800               ,TAX_RSP_CH3_STA_CODE_TYP_ID                       40780099
407900               ,TAX_RSP_CH3_STA_CODE_ID                           40790099
408000               ,TAX_RSP_CH4_STA_CODE_TYP_ID                       40800099
408100               ,TAX_RSP_CH4_STA_CODE_ID                           40810099
408200               ,LMT_ON_BEN_CD                                     40820099
408300               ,UNIQUE_FORM_ID                                    40830099
408400            )                                                     40840099
408500          VALUES                                                  40850099
408600            (                                                     40860099
408700                :MFS-W90-A999.FUND-CODE                           40870099
408800               ,:MFS-W90-A999.ACCOUNT-NUMBER                      40880099
408900               ,:MFS-W90-A999.TAX-YR-DT                           40890099
409000               ,:MFS-W90-A999.ACCUMULATION-TYPE-CD                40900099
409100               ,:MFS-W90-A999.MFA-1042S-RPT-ITEM-ID               40910099
409200               ,:MFS-W90-A999.LAST-MNT-OPID                       40920099
409300               ,:MFS-W90-A999.LAST-MNT-DATE-TIME                  40930099
409400               ,:MFS-W90-A999.TAX-RSP-ST-CNY-CD                   40940099
409500               ,:MFS-W90-A999.INCOME-TYPE-CD                      40950099
409600               ,:MFS-W90-A999.TAX-RSP-TAX-ID                      40960099
409700                  INDICATOR                                       40970099
409800                :MFS-W90-A999.TAX-RSP-TAX-ID-NC                   40980099
409900               ,:MFS-W90-A999.CH3-TAX-RT                          40990099
410000               ,:MFS-W90-A999.CH4-TAX-RT                          41000099
410100               ,:MFS-W90-A999.CH3-WITHHOLDING-CD                  41010099
410200               ,:MFS-W90-A999.CH4-WITHHOLDING-CD                  41020099
410300               ,:MFS-W90-A999.CH3-EXEMPTION-CD                    41030099
410400                  INDICATOR                                       41040099
410500                :MFS-W90-A999.CH3-EXEMPTION-CD-NC                 41050099
410600               ,:MFS-W90-A999.CH4-EXEMPTION-CD                    41060099
410700                  INDICATOR                                       41070099
410800                :MFS-W90-A999.CH4-EXEMPTION-CD-NC                 41080099
410900               ,:MFS-W90-A999.TAX-RSP-CH3-STA-CODE-TYP-ID         41090099
411000                  INDICATOR                                       41100099
411100                :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-TYP-ID-NC      41110099
411200               ,:MFS-W90-A999.TAX-RSP-CH3-STA-CODE-ID             41120099
411300                  INDICATOR                                       41130099
411400                :MFS-W90-A999.TAX-RSP-CH3-STA-CODE-ID-NC          41140099
411500               ,:MFS-W90-A999.TAX-RSP-CH4-STA-CODE-TYP-ID         41150099
411600                  INDICATOR                                       41160099
411700                :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-TYP-ID-NC      41170099
411800               ,:MFS-W90-A999.TAX-RSP-CH4-STA-CODE-ID             41180099
411900                  INDICATOR                                       41190099
412000                :MFS-W90-A999.TAX-RSP-CH4-STA-CODE-ID-NC          41200099
412100               ,:MFS-W90-A999.LMT-ON-BEN-CD                       41210099
412200                  INDICATOR                                       41220099
412300                :MFS-W90-A999.LMT-ON-BEN-CD-NC                    41230099
412400               ,:MFS-W90-A999.UNIQUE-FORM-ID                      41240099
412500            )                                                     41250099
412600     END-EXEC.                                                    41260099
412700                                                                  41270099
412800     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE OF WS00575.             41280099
412900                                                                  41290099
413000     EVALUATE TRUE                                                41300099
413100       WHEN SQL-RETURN-SUCCESSFUL         OF WS00575              41310099
413200            ADD WS-ONE                    TO WS-W90-ADD-CNT       41320099
413300            MOVE 'W90A999'                                        41330099
413400              TO AUDIT-DATAVIEW-ID        OF PSR1184              41340099
413500            MOVE MFS-W90-A999                                     41350099
413600              TO AFTER-RECORD             OF PSR1184              41360099
413700            MOVE LENGTH                   OF MFS-W90-A999         41370099
413800              TO DATAVIEW-IMAGE-TXT-LEN   OF PSR1184              41380099
413900            PERFORM 8600-CALL-SR1184                              41390099
414000       WHEN OTHER                                                 41400099
414100            DISPLAY '************ B27935 ABENDING ************'   41410099
414200               UPON CONSOLE                                       41420099
414300            DISPLAY '* PARAGRAPH : 7800-INSERT-W90-RECORD    *'   41430099
414400               UPON CONSOLE                                       41440099
414500            DISPLAY '* UNSUCCESSFUL INSERT W90 TABLE         *'   41450099
414600               UPON CONSOLE                                       41460099
414700            DISPLAY '* RETURN CODE    : '                         41470099
414800                    SQLSTATE-RETURN-CDE    OF WS00575             41480099
414900               UPON CONSOLE                                       41490099
415000            DISPLAY '*****************************************'   41500099
415100               UPON CONSOLE                                       41510099
415200            CALL SR0002                                           41520099
415300     END-EVALUATE.                                                41530099
415400                                                                  41540099
415500                                                                  41550099
415600 7850-GET-AMENDMENT.                                              41560099
415700                                                                  41570099
415800     IF WS-INSERT                                                 41580099
415900        PERFORM 8050-SSN-CHANGES-AMENDMENT                        41590099
416000        MOVE WS-CUR-AMENDMENT-NBR                                 41600099
416100          TO AMENDMENT-NBR              OF MFS-W92-A999           41610099
416200     ELSE                                                         41620099
416300        PERFORM 8850-CHECK-STATUS                                 41630099
416400                                                                  41640099
416500        IF WS-STATUS-0                                            41650099
416600           MOVE +0                                                41660099
416700             TO AMENDMENT-NBR           OF MFS-W92-A999           41670099
416800        ELSE                                                      41680099
416900           IF WS-REPORTING-PRODUCED                               41690099
417000           OR WS-REPORTING-CORR-PRODUCED                          41700099
417100           OR WS-REPORTING-ZERO-CORR-PRD                          41710099
417200              ADD +1                                              41720099
417300               TO AMENDMENT-NBR         OF MFS-W92-A999           41730099
417400           END-IF                                                 41740099
417500       END-IF                                                     41750099
417600     END-IF.                                                      41760099
417700                                                                  41770099
417800                                                                  41780099
417900 7900-SELECT-PREV-STATUS.                                         41790099
418000                                                                  41800099
418100     INITIALIZE MFS-W92-A999.                                     41810099
418200                                                                  41820099
418300     MOVE FUND-CODE             OF WS-CURR-W92-REC                41830099
418400       TO FUND-CODE             OF MFS-W92-A999.                  41840099
418500     MOVE ACCOUNT-NUMBER        OF WS-CURR-W92-REC                41850099
418600       TO ACCOUNT-NUMBER        OF MFS-W92-A999.                  41860099
418700     MOVE TAX-YR-DT             OF WS-CURR-W92-REC                41870099
418800       TO TAX-YR-DT             OF MFS-W92-A999.                  41880099
418900     MOVE ACCUMULATION-TYPE-CD  OF WS-CURR-W92-REC                41890099
419000       TO ACCUMULATION-TYPE-CD  OF MFS-W92-A999.                  41900099
419100     MOVE MFA-1042S-RPT-ITEM-ID OF WS-CURR-W90-REC                41910099
419200       TO MFA-1042S-RPT-ITEM-ID OF MFS-W92-A999.                  41920099
419300                                                                  41930099
419400     EXEC SQL                                                     41940099
419500       SELECT                                                     41950099
419600             W92.ADD_DT_TM                                        41960099
419700            ,W92.GROSS_INCOME_AT                                  41970099
419800            ,W92.TAX_WITHHOLDING_AT                               41980099
419900            ,W92.TAX_RSP_GIIN_EXTERNAL_ID                         41990099
420000            ,W92.NQI_EIN_ID                                       42000099
420100            ,W92.NQI_GIIN_EXTERNAL_ID                             42010099
420200            ,W92.NQI_STATE_COUNTRY_CD                             42020099
420300            ,W92.NQI_FOREIGN_TAX_ID                               42030099
420400            ,W92.TAX_RSP_FOREIGN_TAX_ID                           42040099
420500            ,W92.TAX_RSP_BIRTH_DT                                 42050099
420600            ,W92.NQI_CH3_STA_CODE_TYPE_ID                         42060099
420700            ,W92.NQI_CH3_STA_CODE_ID                              42070099
420800            ,W92.NQI_CH4_STA_CODE_TYPE_ID                         42080099
420900            ,W92.NQI_CH4_STA_CODE_ID                              42090099
421000            ,W92.REPORTING_STATUS_CD                              42100099
421100            ,W92.AMENDMENT_NBR                                    42110099
421200       INTO                                                       42120099
421300              :MFS-W92-A999.ADD-DT-TM                             42130099
421400            , :MFS-W92-A999.GROSS-INCOME-AT                       42140099
421500            , :MFS-W92-A999.TAX-WITHHOLDING-AT                    42150099
421600            , :MFS-W92-A999.TAX-RSP-GIIN-EXTERNAL-ID              42160099
421700                INDICATOR                                         42170099
421800              :MFS-W92-A999.TAX-RSP-GIIN-EXTERNAL-ID-NC           42180099
421900            , :MFS-W92-A999.NQI-EIN-ID                            42190099
422000            , :MFS-W92-A999.NQI-GIIN-EXTERNAL-ID                  42200099
422100                INDICATOR                                         42210099
422200              :MFS-W92-A999.NQI-GIIN-EXTERNAL-ID-NC               42220099
422300            , :MFS-W92-A999.NQI-STATE-COUNTRY-CD                  42230099
422400                INDICATOR                                         42240099
422500              :MFS-W92-A999.NQI-STATE-COUNTRY-CD-NC               42250099
422600            , :MFS-W92-A999.NQI-FOREIGN-TAX-ID                    42260099
422700            , :MFS-W92-A999.TAX-RSP-FOREIGN-TAX-ID                42270099
422800                INDICATOR                                         42280099
422900              :MFS-W92-A999.TAX-RSP-FOREIGN-TAX-ID-NC             42290099
423000            , :MFS-W92-A999.TAX-RSP-BIRTH-DT                      42300099
423100                INDICATOR                                         42310099
423200              :MFS-W92-A999.TAX-RSP-BIRTH-DT-NC                   42320099
423300            , :MFS-W92-A999.NQI-CH3-STA-CODE-TYPE-ID              42330099
423400                INDICATOR                                         42340099
423500              :MFS-W92-A999.NQI-CH3-STA-CODE-TYPE-ID-NC           42350099
423600            , :MFS-W92-A999.NQI-CH3-STA-CODE-ID                   42360099
423700                INDICATOR                                         42370099
423800              :MFS-W92-A999.NQI-CH3-STA-CODE-ID-NC                42380099
423900            , :MFS-W92-A999.NQI-CH4-STA-CODE-TYPE-ID              42390099
424000                INDICATOR                                         42400099
424100              :MFS-W92-A999.NQI-CH4-STA-CODE-TYPE-ID-NC           42410099
424200            , :MFS-W92-A999.NQI-CH4-STA-CODE-ID                   42420099
424300                INDICATOR                                         42430099
424400              :MFS-W92-A999.NQI-CH4-STA-CODE-ID-NC                42440099
424500            , :MFS-W92-A999.REPORTING-STATUS-CD                   42450099
424600            , :MFS-W92-A999.AMENDMENT-NBR                         42460099
424700        FROM W92_A999        AS W92                               42470099
424800       WHERE W92.FUND_CODE                                        42480099
424900             = :MFS-W92-A999.FUND-CODE                            42490099
425000         AND W92.ACCOUNT_NUMBER                                   42500099
425100             = :MFS-W92-A999.ACCOUNT-NUMBER                       42510099
425200         AND W92.TAX_YR_DT                                        42520099
425300             = :MFS-W92-A999.TAX-YR-DT                            42530099
425400         AND W92.ACCUMULATION_TYPE_CD                             42540099
425500             = :MFS-W92-A999.ACCUMULATION-TYPE-CD                 42550099
425600         AND W92.MFA_1042S_RPT_ITEM_ID                            42560099
425700             = :MFS-W92-A999.MFA-1042S-RPT-ITEM-ID                42570099
425800         AND W92.ADD_DT_TM                                        42580099
425900             < (SELECT                                            42590099
426000                       MAX(W92B.ADD_DT_TM)                        42600099
426100                  FROM                                            42610099
426200                       W92_A999 AS W92B                           42620099
426300                 WHERE                                            42630099
426400                       W92B.FUND_CODE                             42640099
426500                       = W92.FUND_CODE                            42650099
426600                   AND W92B.ACCOUNT_NUMBER                        42660099
426700                       = W92.ACCOUNT_NUMBER                       42670099
426800                   AND W92B.TAX_YR_DT                             42680099
426900                       = W92.TAX_YR_DT                            42690099
427000                   AND W92B.ACCUMULATION_TYPE_CD                  42700099
427100                       = W92.ACCUMULATION_TYPE_CD                 42710099
427200                   AND W92B.MFA_1042S_RPT_ITEM_ID                 42720099
427300                       = W92.MFA_1042S_RPT_ITEM_ID                42730099
427400                   AND W92B.REPORTING_STATUS_DT IS NOT NULL       42740099
427500                )                                                 42750099
427600        ORDER BY W92.ADD_DT_TM DESC                               42760099
427700        FETCH FIRST 1 ROW ONLY                                    42770099
427800     END-EXEC.                                                    42780099
427900                                                                  42790099
428000     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE    OF WS00575.          42800099
428100                                                                  42810099
428200     EVALUATE TRUE                                                42820099
428300         WHEN SQL-RETURN-SUCCESSFUL          OF WS00575           42830099
428400              CONTINUE                                            42840099
428500         WHEN SQL-RETURN-NOT-FOUND           OF WS00575           42850099
428600              MOVE SPACE                                          42860099
428700                TO REPORTING-STATUS-CD       OF MFS-W92-A999      42870099
428800         WHEN OTHER                                               42880099
428900              DISPLAY '************ B27935 ABENDING ************' 42890099
429000                 UPON CONSOLE                                     42900099
429100              DISPLAY '* PARAGRAPH : 7900-SELECT-PREV-STATUS   *' 42910099
429200                 UPON CONSOLE                                     42920099
429300              DISPLAY '* UNSUCCESSFUL SELECT W92 TABLE         *' 42930099
429400                 UPON CONSOLE                                     42940099
429500              DISPLAY '* RETURN CODE    : '                       42950099
429600                      SQLSTATE-RETURN-CDE    OF WS00575           42960099
429700                 UPON CONSOLE                                     42970099
429800              DISPLAY '* FUND CODE      : '                       42980099
429900                      FUND-CODE              OF MFS-W92-A999      42990099
430000                 UPON CONSOLE                                     43000099
430100              DISPLAY '* ACCOUNT NUMBER : '                       43010099
430200                      ACCOUNT-NUMBER         OF MFS-W92-A999      43020099
430300                 UPON CONSOLE                                     43030099
430400              DISPLAY '* TAX YEAR       : '                       43040099
430500                      TAX-YR-DT              OF MFS-W92-A999      43050099
430600                 UPON CONSOLE                                     43060099
430700              DISPLAY '* ACCUMULATION CD:'                        43070099
430800                      ACCUMULATION-TYPE-CD   OF MFS-W92-A999      43080099
430900                 UPON CONSOLE                                     43090099
431000              DISPLAY '* ITEM ID        : '                       43100099
431100                      MFA-1042S-RPT-ITEM-ID  OF MFS-W92-A999      43110099
431200                 UPON CONSOLE                                     43120099
431300              DISPLAY '*****************************************' 43130099
431400                 UPON CONSOLE                                     43140099
431500              CALL SR0002                                         43150099
431600     END-EVALUATE.                                                43160099
431700                                                                  43170099
431800                                                                  43180099
431900 7950-CHECK-PREV-STATUS.                                          43190099
432000                                                                  43200099
432100     SET WS-DELETE-ACTION-NO TO TRUE.                             43210099
432200                                                                  43220099
432300     IF  GROSS-INCOME-AT            OF MFS-W92-A999    =          43230099
432400         GROSS-INCOME-AT            OF 100-1042S-RPT-INFO-REC     43240099
432500     AND TAX-WITHHOLDING-AT         OF MFS-W92-A999    =          43250099
432600         TAX-WITHHOLDING-AT         OF 100-1042S-RPT-INFO-REC     43260099
432700     AND TAX-RSP-GIIN-EXTERNAL-ID   OF MFS-W92-A999    =          43270099
432800         TAX-RSP-GIIN-EXTERNAL-ID   OF 100-1042S-RPT-INFO-REC     43280099
432900     AND NQI-EIN-ID                 OF MFS-W92-A999    =          43290099
433000         NQI-EIN-ID                 OF 100-1042S-RPT-INFO-REC     43300099
433100     AND NQI-GIIN-EXTERNAL-ID       OF MFS-W92-A999    =          43310099
433200         NQI-GIIN-EXTERNAL-ID       OF 100-1042S-RPT-INFO-REC     43320099
433300     AND NQI-STATE-COUNTRY-CD       OF MFS-W92-A999    =          43330099
433400         NQI-STATE-COUNTRY-CD       OF 100-1042S-RPT-INFO-REC     43340099
433500     AND NQI-FOREIGN-TAX-ID         OF MFS-W92-A999    =          43350099
433600         NQI-FOREIGN-TAX-ID         OF 100-1042S-RPT-INFO-REC     43360099
433700     AND TAX-RSP-FOREIGN-TAX-ID     OF MFS-W92-A999    =          43370099
433800         TAX-RSP-FOREIGN-TAX-ID     OF 100-1042S-RPT-INFO-REC     43380099
433900     AND TAX-RSP-BIRTH-DT           OF MFS-W92-A999    =          43390099
434000         TAX-RSP-BIRTH-DT           OF 100-1042S-RPT-INFO-REC     43400099
434100     AND NQI-CH3-STA-CODE-TYPE-ID   OF MFS-W92-A999    =          43410099
434200         NQI-CH3-STA-CODE-TYPE-ID   OF 100-1042S-RPT-INFO-REC     43420099
434300     AND NQI-CH3-STA-CODE-ID        OF MFS-W92-A999    =          43430099
434400         NQI-CH3-STA-CODE-ID        OF 100-1042S-RPT-INFO-REC     43440099
434500     AND NQI-CH4-STA-CODE-TYPE-ID   OF MFS-W92-A999    =          43450099
434600         NQI-CH4-STA-CODE-TYPE-ID   OF 100-1042S-RPT-INFO-REC     43460099
434700     AND NQI-CH4-STA-CODE-ID        OF MFS-W92-A999    =          43470099
434800         NQI-CH4-STA-CODE-ID        OF 100-1042S-RPT-INFO-REC     43480099
434900         SET WS-DELETE-ACTION-YES   TO TRUE                       43490099
435000     END-IF.                                                      43500099
435100                                                                  43510099
435200 8000-SET-W92-NULL-INDICATOR.                                     43520099
435300                                                                  43530099
435400     IF TAX-RSP-GIIN-EXTERNAL-ID        OF MFS-W92-A999 = SPACE   43540099
435500        SET TAX-RSP-GIIN-EXTERNAL-ID-NY OF MFS-W92-A999 TO TRUE   43550099
435600     ELSE                                                         43560099
435700        SET TAX-RSP-GIIN-EXTERNAL-ID-NN OF MFS-W92-A999 TO TRUE   43570099
435800     END-IF.                                                      43580099
435900                                                                  43590099
436000     IF NQI-GIIN-EXTERNAL-ID            OF MFS-W92-A999 = SPACE   43600099
436100        SET NQI-GIIN-EXTERNAL-ID-NY     OF MFS-W92-A999 TO TRUE   43610099
436200     ELSE                                                         43620099
436300        SET NQI-GIIN-EXTERNAL-ID-NN     OF MFS-W92-A999 TO TRUE   43630099
436400     END-IF.                                                      43640099
436500                                                                  43650099
436600     IF NQI-STATE-COUNTRY-CD            OF MFS-W92-A999 = ZERO    43660099
436700        SET NQI-STATE-COUNTRY-CD-NY     OF MFS-W92-A999  TO TRUE  43670099
436800     ELSE                                                         43680099
436900        SET NQI-STATE-COUNTRY-CD-NN     OF MFS-W92-A999  TO TRUE  43690099
437000     END-IF.                                                      43700099
437100                                                                  43710099
437200     IF TAX-RSP-FOREIGN-TAX-ID          OF MFS-W92-A999 = SPACE   43720099
437300        SET TAX-RSP-FOREIGN-TAX-ID-NY   OF MFS-W92-A999 TO TRUE   43730099
437400     ELSE                                                         43740099
437500        SET TAX-RSP-FOREIGN-TAX-ID-NN   OF MFS-W92-A999 TO TRUE   43750099
437600     END-IF.                                                      43760099
437700                                                                  43770099
437800     IF TAX-RSP-BIRTH-DT                OF MFS-W92-A999 = SPACE   43780099
437900        SET TAX-RSP-BIRTH-DT-NY         OF MFS-W92-A999 TO TRUE   43790099
438000     ELSE                                                         43800099
438100        SET TAX-RSP-BIRTH-DT-NN         OF MFS-W92-A999 TO TRUE   43810099
438200     END-IF.                                                      43820099
438300                                                                  43830099
438400     IF NQI-CH3-STA-CODE-TYPE-ID        OF MFS-W92-A999 = ZERO    43840099
438500        SET NQI-CH3-STA-CODE-TYPE-ID-NY OF MFS-W92-A999 TO TRUE   43850099
438600     ELSE                                                         43860099
438700        SET NQI-CH3-STA-CODE-TYPE-ID-NN OF MFS-W92-A999 TO TRUE   43870099
438800     END-IF.                                                      43880099
438900                                                                  43890099
439000     IF NQI-CH3-STA-CODE-ID             OF MFS-W92-A999 = SPACE   43900099
439100        SET NQI-CH3-STA-CODE-ID-NY      OF MFS-W92-A999 TO TRUE   43910099
439200     ELSE                                                         43920099
439300        SET NQI-CH3-STA-CODE-ID-NN      OF MFS-W92-A999 TO TRUE   43930099
439400     END-IF.                                                      43940099
439500                                                                  43950099
439600     IF NQI-CH4-STA-CODE-TYPE-ID        OF MFS-W92-A999 = ZERO    43960099
439700        SET NQI-CH4-STA-CODE-TYPE-ID-NY OF MFS-W92-A999 TO TRUE   43970099
439800     ELSE                                                         43980099
439900        SET NQI-CH4-STA-CODE-TYPE-ID-NN OF MFS-W92-A999 TO TRUE   43990099
440000     END-IF.                                                      44000099
440100                                                                  44010099
440200     IF NQI-CH4-STA-CODE-ID             OF MFS-W92-A999 = SPACE   44020099
440300        SET NQI-CH4-STA-CODE-ID-NY      OF MFS-W92-A999 TO TRUE   44030099
440400     ELSE                                                         44040099
440500        SET NQI-CH4-STA-CODE-ID-NN      OF MFS-W92-A999 TO TRUE   44050099
440600     END-IF.                                                      44060099
440700                                                                  44070099
440800 8050-SSN-CHANGES-AMENDMENT.                                      44080099
440900                                                                  44090099
441000     EVALUATE TRUE                                                44100099
441100         WHEN WS-STATUS-2        AND                              44110099
441200              WS-CHANGED-SSN-YES AND                              44120099
441300              REPORTING-STATUS-CORR-REQUIRED OF WS-CURR-W92-REC   44130099
441400              MOVE WS-CUR-AMENDMENT-NBR                           44140099
441500                TO AMENDMENT-NBR             OF MFS-W92-A999      44150099
441600         WHEN WS-STATUS-2        AND                              44160099
441000             (REPORTING-STATUS-NOT-CREATED   OF WS-CURR-W92-REC OR44100001
441100              REPORTING-STATUS-PRODUCED      OF WS-CURR-W92-REC OR44110001
441300              REPORTING-STATUS-ZERO-REQUIRED OF WS-CURR-W92-REC OR44130001
441400              REPORTING-STATUS-CORR-REQUIRED OF WS-CURR-W92-REC)  44140001
442200              IF WS-SSN-CHANGE-YES                                44220099
441600                 MOVE INCOME-TYPE-CD OF 100-1042S-RPT-INFO-REC    44160001
441700                   TO INCOME-TYPE-CD OF MFS-W90-A999              44170001
442300                 SET REPORTING-STATUS-ZERO-REQUIRED               44230099
442400                                             OF MFS-W92-A999      44240099
442500                                             TO TRUE              44250099
442600                 PERFORM 8400-SELECT-TWO-STEP-SSN                 44260099
442070                 MOVE AMENDMENT-NBR          OF MFS-W92-A999      44207001
442080                   TO WS-CUR-AMENDMENT-NBR                        44208001
442700              ELSE                                                44270099
441900                 PERFORM 6520-MOVE-WRKE341-TO-W90                 44190000
442800                 PERFORM 8150-SELECT-PREV-SSN                     44280099
442900              END-IF                                              44290099
443000              ADD +1                                              44300099
443100               TO WS-CUR-AMENDMENT-NBR                            44310099
443200         WHEN WS-STATUS-0                                         44320099
443300              MOVE +0                                             44330099
443400                TO WS-CUR-AMENDMENT-NBR                           44340099
443500         WHEN OTHER                                               44350099
443600              ADD +1                                              44360099
443700               TO WS-CUR-AMENDMENT-NBR                            44370099
443800     END-EVALUATE.                                                44380099
443900                                                                  44390099
444000                                                                  44400099
444100 8100-OPEN-W90-W92-ACCM-CURSOR.                                   44410099
444200                                                                  44420099
444300     INITIALIZE MFS-W90-A999                                      44430099
444400                MFS-W92-A999.                                     44440099
444500                                                                  44450099
444600     MOVE FUND-CODE                OF 110-ACCT-DRIVER-REC         44460099
444700       TO FUND-CODE                OF MFS-W90-A999.               44470099
444800     MOVE ACCOUNT-NUMBER           OF 110-ACCT-DRIVER-REC         44480099
444900       TO ACCOUNT-NUMBER           OF MFS-W90-A999.               44490099
445000     MOVE TAX-PROCESSING-YEAR-DATE OF 110-ACCT-DRIVER-REC         44500099
445100       TO TAX-YR-DT                OF MFS-W90-A999.               44510099
445200     MOVE ACCUMULATION-TYPE-CD     OF 100-1042S-RPT-INFO-REC      44520099
445300       TO ACCUMULATION-TYPE-CD     OF MFS-W90-A999.               44530099
445400                                                                  44540099
445500     EXEC  SQL                                                    44550099
445600          OPEN  W90_W92_ACCM_CURSOR                               44560099
445700     END-EXEC.                                                    44570099
445800                                                                  44580099
445900     MOVE SQLSTATE TO SQLSTATE-RETURN-CDE OF WS00575.             44590099
446000                                                                  44600099
446100     EVALUATE TRUE                                                44610099
446200       WHEN SQL-RETURN-SUCCESSFUL   OF WS00575                    44620099
446300            CONTINUE                                              44630099
446400       WHEN OTHER                                                 44640099
446500            DISPLAY '************** B27935 ABENDING *************'44650099
446600               UPON CONSOLE                                       44660099
446700            DISPLAY '* PARAGRAPH : 8100-OPEN-W90-W92-ACCM-CURSOR*'44670099
446800               UPON CONSOLE                                       44680099
446900            DISPLAY '* UNSUCCESSFUL OPEN  W90_W92_ACCM_CURSOR   *'44690099
447000               UPON CONSOLE                                       44700099
447100            DISPLAY '* RETURN CODE    : '                         44710099
447200                    SQLSTATE-RETURN-CDE    OF WS00575             44720099
447300               UPON CONSOLE                                       44730099
447400            DISPLAY '* FUND CODE      : '                         44740099
447500                    FUND-CODE              OF MFS-W90-A999        44750099
447600               UPON CONSOLE                                       44760099
447700            DISPLAY '* ACCOUNT NUMBER : '                         44770099
447800                    ACCOUNT-NUMBER         OF MFS-W90-A999        44780099
447900               UPON CONSOLE                                       44790099
448000            DISPLAY '* TAX YEAR       : '                         44800099
448100                    TAX-YR-DT              OF MFS-W90-A999        44810099
448200               UPON CONSOLE                                       44820099
448300            DISPLAY '* ACCUMULATION TYPE : '                      44830099
448400                    ACCUMULATION-TYPE-CD   OF MFS-W90-A999        44840099
448500               UPON CONSOLE                                       44850099
448600            DISPLAY '********************************************'44860099
448700               UPON CONSOLE                                       44870099
448800            CALL SR0002                                           44880099
448900     END-EVALUATE.                                                44890099
449000                                                                  44900099
449100                                                                  44910099
449200 8120-FETCH-W90-W92-ACCM-CURSOR.                                  44920099
449300                                                                  44930099
449400     EXEC SQL                                                     44940099
449500       FETCH W90_W92_ACCM_CURSOR                                  44950099
449600       INTO                                                       44960099
449700             :MFS-W90-A999.MFA-1042S-RPT-ITEM-ID                  44970099
449800            ,:MFS-W90-A999.LAST-MNT-OPID                          44980099
449900            ,:MFS-W90-A999.LAST-MNT-DATE-TIME                     44990099
450000            ,:MFS-W90-A999.TAX-RSP-ST-CNY-CD                      45000099
450100            ,:MFS-W90-A999.INCOME-TYPE-CD                         45010099
450200            ,:MFS-W90-A999.TAX-RSP-TAX-ID                         45020099
453600               INDICATOR