SHARE
TWEET

Untitled

a guest Sep 11th, 2018 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  IDENTIFICATION DIVISION.
  2.  PROGRAM-ID. PTCH01JN.
  3.  AUTHOR. Jan Noel Calayag.
  4.  
  5.  ENVIRONMENT DIVISION.
  6.  INPUT-OUTPUT SECTION.
  7.  FILE-CONTROL.
  8.  
  9.        SELECT EMPLOYEE-FILE ASSIGN TO INPUT01
  10.          ORGANIZATION IS SEQUENTIAL.
  11.        SELECT PRINT-FILE ASSIGN TO OUTPUT01
  12.          ORGANIZATION IS SEQUENTIAL.
  13.  
  14.  DATA DIVISION.
  15.  FILE SECTION.
  16.  FD EMPLOYEE-FILE
  17.        RECORD CONTAINS 105 CHARACTERS
  18.        LABEL RECORDS ARE STANDARD
  19.        DATA RECORD IS EMPLOYEE-REC.
  20.  01 EMPLOYEE-REC                PIC X(105).
  21.  
  22.  FD PRINT-FILE
  23.        RECORD CONTAINS 132 CHARACTERS
  24.        LABEL RECORDS ARE STANDARD
  25.        DATA RECORD IS PRINT-REC.
  26.  01 PRINT-REC                   PIC X(132).
  27.  
  28.  WORKING-STORAGE SECTION.
  29.  01 WS-INPUT.
  30.     05 WS-EMPLOYEE-INFO.
  31.        10 INPUT-TIN-NUMBER     PIC 9(09).
  32.        10 INPUT-NAME           PIC X(35).
  33.        10 INPUT-EXMPT-STAT     PIC X.
  34.           88 ES-SINGLE         VALUE 'S'.
  35.           88 ES-HEAD           VALUE 'H'.
  36.           88 ES-MARRIED        VALUE 'M'.
  37.        10 INPUT-QTY-DPNDNT     PIC 9(02).
  38.        10 INPUT-SP-CLAIM       PIC X.
  39.        10 INPUT-TP-GROSS       PIC 9(07)V99.
  40.        10 INPUT-SP-GROSS       PIC 9(07)V99.
  41.        10 INPUT-TP-OTHER1      PIC 9(07)V99.
  42.        10 INPUT-SP-OTHER1      PIC 9(07)V99.
  43.        10 INPUT-TP-OTHER2      PIC 9(07)V99.
  44.        10 INPUT-SP-OTHER2      PIC 9(07)V99.
  45.  
  46.  01 WS-COMPUTATION.
  47.     05 WS-GROSS-TAX.
  48.        10 COMP-TP-GRS-TAX-INC  PIC 9(07)V99 VALUE ZERO.
  49.        10 COMP-SP-GRS-TAX-INC  PIC 9(07)V99 VALUE ZERO.
  50.        10 COMP-TL-GRS-TAX-INC  PIC 9(07)V99 VALUE ZERO.
  51.     05 WS-TAX-EXEMPTION.  
  52.        10 COMP-TP-EXEMPTION    PIC 9(07)V99 VALUE ZERO.
  53.        10 COMP-SP-EXEMPTION    PIC 9(07)V99 VALUE ZERO.
  54.     05 WS-NET-TAX.
  55.        10 COMP-TP-NET-TAX-INC  PIC 9(07)V99 VALUE ZERO.
  56.        10 COMP-SP-NET-TAX-INC  PIC 9(07)V99 VALUE ZERO.
  57.     05 WS-TAX-DUE.
  58.        10 COMP-TP-TAX-DUE      PIC 9(07)V99 VALUE ZERO.
  59.        10 COMP-SP-TAX-DUE      PIC 9(07)V99 VALUE ZERO.
  60.        10 COMP-TL-TAX-DUE      PIC 9(07)V99 VALUE ZERO.
  61.     05 WS-TAKE-HOME-PAY.  
  62.        10 COMP-TL-TKHM-PAY     PIC 9(07)V99 VALUE ZERO.
  63.     05 WS-TOTALS.
  64.        10 COMP-GD-GRS-TAX-INC  PIC 9(08)V99 VALUE ZERO.
  65.        10 COMP-GD-TAX-DUE      PIC 9(08)V99 VALUE ZERO.
  66.        10 COMP-GD-TKHM-PAY     PIC 9(08)V99 VALUE ZERO.
  67.        10 COMP-TL-NUM-EMP      PIC 9(05)    VALUE ZERO.  
  68.    
  69.  01 WS-SWITCHES-FLAGS.
  70.     05 WS-FILE-STAT            PIC X        VALUE 'N'.
  71.        88 WS-NOT-EOF           VALUE 'N'.
  72.        88 WS-EOF               VALUE 'Y'.
  73.     05 WS-PAGE-HEADER          PIC X        VALUE 'N'.
  74.        88 WS-HDR-PRINTED       VALUE 'Y'.                                      
  75.        88 WS-HDR-NOT-PRINTED   VALUE 'Y'.            
  76.      
  77.  PROCEDURE DIVISION.
  78.  
  79. ***********************************************************************
  80. *        0000-MAIN: MAIN PROGRAM                                      *
  81. *        Procedures used:                                             *
  82. *           1000-INITIALIZE                                           *
  83. *           2000-PROCESS                                              *
  84. *           3000-FINAL                                                *
  85. ***********************************************************************
  86.  0000-MAIN-PROC.
  87.       PERFORM 1000-INITIALIZE THRU 1000-EXIT.
  88. *     PERFORM 2000-PROCESS    THRU 2000-EXIT.
  89.       PERFORM 3000-FINAL      THRU 3000-EXIT.
  90.       STOP RUN.
  91.  0000-EXIT.
  92.       EXIT.
  93.  
  94. ***********************************************************************
  95. *        1000-INITIALIZE: OPENING REQUIRED FILES                      *
  96. ***********************************************************************
  97.  1000-INITIALIZE.
  98.       OPEN INPUT EMPLOYEE-FILE.
  99.       OPEN INPUT PRINT-FILE.
  100.  1000-EXIT.  
  101.       EXIT.
  102.    
  103. ***********************************************************************
  104. *        3000-FINAL: CLOSING FILES                                    *
  105. ***********************************************************************
  106.  3000-FINAL.
  107.       CLOSE EMPLOYEE-FILE.
  108.       CLOSE PRINT-FILE.
  109.  3000-EXIT.  
  110.       EXIT.
  111.    
  112. ***********************************************************************
  113. *        3000-FINAL: PROGRAM PROCESS                                  *
  114. ***********************************************************************
  115.  2000-INITIALIZE.
  116.       CLOSE EMPLOYEE-FILE.
  117.       CLOSE PRINT-FILE.
  118.  2000-EXIT.  
  119.       EXIT.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top