rp21

Billing

Sep 16th, 2015
534
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.        IDENTIFICATION DIVISION.
  2.        PROGRAM-ID BILL.
  3.        ENVIRONMENT DIVISION.
  4.        DATA DIVISION.
  5.        WORKING-STORAGE SECTION.
  6.        02 CUSTOMER OCCURS 3 TIMES.
  7.           03 ITEMCODE PIC 999.
  8.           03 ITEMNAME PIC X(10).
  9.           03 PRICE PIC 9(4).
  10.           03 QUANTITY PIC 99.
  11.           03 TOTAL PIC 9(6).
  12.        01 ROW1.
  13.           03 FILLER PIC X(10) VALUE SPACES.
  14.           03 LABEL1 PIC X(9) VALUE "ITEMCODE".
  15.           03 FILLER PIC X(5) VALUE SPACES.
  16.           03 LABEL2 PIC X(9) VALUE "ITEMNAME".
  17.           03 FILLER PIC X(5) VALUE SPACES.
  18.           03 LABEL3 PIC X(6) VALUE "PRICE".
  19.           03 FILLER PIC X(5) VALUE SPACES.
  20.           03 LABEL4 PIC X(9) VALUE "QUANTITY".
  21.           03 FILLER PIC X(5) VALUE SPACES.
  22.           03 LABEL5 PIC X(6) VALUE "TOTAL".
  23.           03 FILLER PIC X(11) VALUE SPACES.
  24.        01 ROW2.
  25.           03 FILLER PIC X(13) VALUE SPACES.
  26.           03 A PIC ZZZ.
  27.           03 FILLER PIC X(12) VALUE SPACES.
  28.           03 B PIC X(5).
  29.           03 FILLER PIC X(7) VALUE SPACES.
  30.           03 C PIC Z(4).
  31.           03 FILLER PIC X(12) VALUE SPACES.
  32.           03 D PIC ZZ.
  33.           03 FILLER PIC X(5) VALUE SPACES.
  34.           03 E PIC Z(6).
  35.           03 FILLER PIC X(11) VALUE SPACES.
  36.        1 I PIC 99 VALUE 1.
  37.        PROCEDURE DIVISION.
  38.        MAINPARA.
  39.            PERFORM PA VARYING I FROM 1 BY 1 UNTIL I>3.
  40.            PERFORM PB.
  41.            PERFORM PC VARYING I FROM 1 BY 1 UNTIL I>3.
  42.            STOP RUN.
  43.        PA.
  44.            DISPLAY "ENTER ITEMCODE".
  45.            ACCEPT ITEMCODE(I).
  46.            DISPLAY "ENTER ITEMNAME".
  47.            ACCEPT ITEMNAME(I).
  48.            DISPLAY "PRICE".
  49.            ACCEPT PRICE(I).
  50.            DISPLAY "QUANTITY".
  51.            ACCEPT QUANTITY(I).
  52.            COMPUTE TOTAL(I) = PRICE(I) * QUANTITY(I).
  53.        PB.
  54.            DISPLAY ROW1.
  55.        PC.
  56.            MOVE ITEMCODE(I) TO A.
  57.            MOVE ITEMNAME(I) TO B.
  58.            MOVE PRICE(I) TO C.
  59.            MOVE QUANTITY(I) TO D.
  60.            MOVE TOTAL(I) TO E.
  61.            DISPLAY ROW2.
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×