ファイル    編集    編集設定    メニュー    ユーティリティー               
    コンパイラー    テスト    ヘルプ                                           
 sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
 VIEW       HW07I.EV6871.PLIM(ASCCHECK) - 01.13              欄 . : 00001 00072
  コマンド  ===>                                          スクロール  ===> CSR 
 ****** ***************************** データの始め *****************************
 000100 //EV6871S JOB (F9500B,CA75X,41),                                       
 000200 //          EV6871,                                                    
 000300 //          NOTIFY=EV6871,MSGLEVEL=(1,1),MSGCLASS=R,                   
 000400 //          REGION=5000K,CLASS=A                                       
 002300 //*====================================================================
 002400 //DEL EXEC MSSSCR2                                                     
 002500  DSN=HW07I.EV6871.ASCOUT                                               
 002600 /*                                                                     
 002700 //*====================================================================
 002800 //REV      EXEC PROC=PLIXCLG                                           
 002900 //SYSPRINT DD  SYSOUT=*                                                
 003000 //PLI.SYSIN DD *                                                       
 003100   AA: PROC OPTIONS (MAIN);                                             
 003200      DCL ADDR          BUILTIN    ;                                    
 003300      DCL  1 SOUR_DATA,                                                 
 003400             3 RECORD_TYPE CHAR(9),                                     
 003500             3 PRICE       CHAR(20),                                    
 003600             3 AMOUNT      CHAR(20);                                    
 004100      DCL  1 CHK_RESULT,                                                
 004200             3 RECORD_TYPE CHAR(9),                                     
 004300             3 PRICE       CHAR(20),                                    
 004400             3 AMOUNT      CHAR(20);                                    
 004410      DCL  1 CHK_DATA,                                                  
 004420             3 RECORD_TYPE CHAR(9),                                     
 004430             3 PRICE       CHAR(20),                                    
 .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .

    ファイル    編集    編集設定    メニュー    ユーティリティー               
    コンパイラー    テスト    ヘルプ                                           
 sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
 VIEW       HW07I.EV6871.PLIM(ASCCHECK) - 01.13              欄 . : 00001 00072
  コマンド  ===>                                          スクロール  ===> CSR 
 004440             3 AMOUNT      CHAR(20);                                    
 004500      DCL    FINMAIN    FILE   RECORD;                                  
 004600      DCL    FOUT       FILE   RECORD;                                  
 004710      DCL AMT_PRICE          DEC FIXED(15,0) INIT(0) ;                  
 004720      DCL AMT_PRICE_TRAILOR  DEC FIXED(15,0) INIT(0) ;                  
 004730      DCL AMT_AMOUNT         DEC FIXED(15,0) INIT(0) ;                  
 004740      DCL AMT_AMOUNT_TRAILOR DEC FIXED(15,0) INIT(0) ;                  
 004810                                                                        
 004820      DCL EOF_FINMAIN   BIT(1)    INIT ('0'B)  ;                        
 004900      ON  ENDFILE(FINMAIN) EOF_FINMAIN =  '1'B       ;                  
 005200      OPEN      FILE(FINMAIN)   INPUT  RECORD ;                         
 005300      OPEN      FILE(FOUT)       OUTPUT RECORD ;                        
 005500      SOUR_DATA='';                                                     
 005600      READ  FILE(FINMAIN)  INTO(SOUR_DATA);                             
 005700      DO WHILE(¬EOF_FINMAIN);                                           
 005710         SELECT(SOUR_DATA.RECORD_TYPE);                                 
 005720           WHEN ('PERSON') DO ;                                         
 005723            AMT_PRICE=AMT_PRICE+SOUR_DATA.PRICE  ;                      
 005724            AMT_AMOUNT=AMT_AMOUNT+SOUR_DATA.AMOUNT  ;                   
 005725            CHK_DATA= '';                                               
 005726            CHK_DATA.RECORD_TYPE=SOUR_DATA.RECORD_TYPE;                 
 005727            CHK_DATA.PRICE=SOUR_DATA.PRICE;                             
 005728            CHK_DATA.AMOUNT=SOUR_DATA.AMOUNT;                           
 005729            WRITE FILE(FOUT) FROM(CHK_DATA);                            
 005740           END ;                                                        
 005741           WHEN ('TRAILOR') DO ;                                        
 .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .

    ファイル    編集    編集設定    メニュー    ユーティリティー               
    コンパイラー    テスト    ヘルプ                                           
 sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
 VIEW       HW07I.EV6871.PLIM(ASCCHECK) - 01.13              欄 . : 00001 00072
  コマンド  ===>                                          スクロール  ===> CSR 
 005742            AMT_PRICE_TRAILOR=SOUR_DATA.PRICE  ;                        
 005743            AMT_AMOUNT_TRAILOR=SOUR_DATA.AMOUNT  ;                      
 005744                                                                        
 005745           END ;                                                        
 005746           OTHERWISE DO;                                                
 005754           END ;                                                        
 005755         END ;                                                          
 005756         SOUR_DATA='' ;                                                 
 005757         READ  FILE(FINMAIN)  INTO(SOUR_DATA);                          
 005758      END ;                                                             
 005759      IF AMT_PRICE=AMT_PRICE_TRAILOR & AMT_AMOUNT=AMT_AMOUNT_TRAILOR    
 005760      THEN DO ;                                                         
 005800       CHK_RESULT.RECORD_TYPE='OK     ';                                
 005900       CHK_RESULT.PRICE=AMT_PRICE  ;                                    
 006000       CHK_RESULT.AMOUNT=AMT_AMOUNT;                                    
 006100       WRITE FILE(FOUT)  FROM(CHK_RESULT);                              
 006200       CHK_RESULT.RECORD_TYPE='OK     ';                                
 006210       CHK_RESULT.PRICE=AMT_PRICE_TRAILOR  ;                            
 006220       CHK_RESULT.AMOUNT=AMT_AMOUNT_TRAILOR;                            
 006230       WRITE FILE(FOUT)  FROM(CHK_RESULT);                              
 006300      END     ;                                                         
 006310      ELSE DO ;                                                         
 006321       CHK_RESULT.RECORD_TYPE='FAILED ';                                
 006330       CHK_RESULT.PRICE=AMT_PRICE;                                      
 006340       CHK_RESULT.AMOUNT=AMT_AMOUNT;                                    
 006350       WRITE FILE(FOUT)  FROM(CHK_RESULT);                              
 .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .

    ファイル    編集    編集設定    メニュー    ユーティリティー               
    コンパイラー    テスト    ヘルプ                                           
 sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
 VIEW       HW07I.EV6871.PLIM(ASCCHECK) - 01.13              欄 . : 00001 00072
  コマンド  ===>                                          スクロール  ===> CSR 
 006400      END;                                                              
 006500                                                                        
 007500   END AA;                                                              
 007600 /*                                                                     
 007700 //GO.FINMAIN  DD DSN=HW07I.EV6871.ASCCHEC2,DISP=SHR                    
 007900 //GO.FOUT     DD DSN=HW07I.EV6871.ASCOUT,                              
 008000 //             DISP=(,CATLG),                                          
 008100 //             SPACE=(TRK,(2,1),RLSE),                                 
 008200 //             DCB=(RECFM=FB,LRECL=49,BLKSIZE=0)                       
 008300 /*                                                                     
 008400 //*====================================================================
 008500 //*GENER    EXEC PGM=IEBGENER                                          
 008600 //*SYSPRINT DD SYSOUT=*                                                
 008700 //*SYSUT1   DD DSN=&&SSCHEAD,DISP=(OLD,DELETE)                         
 008800 //*         DD DSN=KQ26I.U143.LEDGER.MONTH.CORRECT,DISP=SHR            
 008900 //*         DD DSN=&&SSCTRA,DISP=(OLD,DELETE)                          
 009000 //*SYSUT2   DD DSN=KQ26I.U143.RECYCLE.IBM.M704,                        
 009100 //*         DISP=(,CATLG),                                             
 009200 //*         SPACE=(TRK,(100,10),RLSE),                                 
 009300 //*         DCB=(LRECL=600,BLKSIZE=0,RECFM=FB)                         
 009400 //*SYSIN    DD DUMMY                                                   
 009500 //*                                                                    
 ****** **************************** データの終り   ****************************
                                                                               
                                                                               
                                                                               
 .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .