Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program-id. Program1 as "rennerc_Program1.Program1".
- data division.
- working-storage section.
- 01 WS-INPUT.
- 05 WS-NAME PIC A(25).
- 05 WS-ADDR PIC X(25).
- 05 WS-ZIP PIC X(25).
- 05 WS-PHONE PIC 9999999999.
- 05 WS-BIKE-DESC PIC X(32).
- 05 WS-BIKE-PRICE PIC 9999V99 VALUE 0.
- 05 WS-ACC1 PIC A(25).
- 05 WS-ACC1-PRICE PIC 999V99 VALUE 0.
- 05 WS-ACC2 PIC A(25).
- 05 WS-ACC2-PRICE PIC 999V99 VALUE 0.
- 05 WS-ACC3 PIC A(25).
- 05 WS-ACC3-PRICE PIC 999V99 VALUE 0.
- 05 WS-ACC4 PIC A(25).
- 05 WS-ACC4-PRICE PIC 999V99 VALUE 0.
- 05 WS-EXIT PIC X VALUE SPACES.
- 01 WD-DISPLAY.
- 05 WD-NAME PIC A(25).
- 05 WD-ADDR PIC X(25).
- 05 WD-ZIP PIC X(25).
- 05 WD-PHONE PIC 9(9).
- 05 Subtotal PIC 9999V99 VALUE 0.
- 05 Total-Price PIC 9999V99 VALUE 0.
- 05 Net-Price PIC 9999V99 VALUE 0.
- 05 B-Discnt-Price PIC 9999V99 VALUE 0.
- 01 WC-CONSTANTS.
- 05 2-Discount PIC P99 VALUE .02.
- 05 3-Discount PIC P99 VALUE .03.
- 05 5-Discount PIC P99 VALUE .05.
- 05 10-Discount PIC 9V99 VALUE 0.10.
- 05 Sales-Tax PIC 9V999 VALUE 1.055.
- SCREEN SECTION.
- 01 Screen-1.
- 05 BLANK SCREEN
- FOREGROUND-COLOR 7
- BACKGROUND-COLOR 0
- HIGHLIGHT.
- 01 Invoice-Screen.
- 05 VALUE "Collin Renner" BLANK SCREEN LINE 1 COL 1.
- 05 VALUE "Bicycle Invoice" LINE 1 COL 26.
- 05 VALUE "Customer Name :" LINE 3 COL 1.
- 05 NAME-INPUT PIC A(25) TO WS-NAME LINE 3 COL 26.
- 05 VALUE "Customer Address :" LINE 4 COL 1.
- 05 ADDR-INPUT PIC X(25) TO WS-ADDR LINE 4 COL 26.
- 05 VALUE "Customer City, State Zip:" LINE 5 COL 1.
- 05 CITY-INPUT PIC X(25) TO WS-ZIP LINE 5 COL 26.
- 05 VALUE "Customer Phone # :" LINE 6 COL 1.
- 05 PHONE-INPUT PIC 9(10) TO WS-PHONE LINE 6 COL 26.
- 05 VALUE "ITEMS ORDERED" LINE 8 COL 1.
- 05 VALUE "Price" LINE 8 COL 45.
- 05 VALUE "Bicycle: " LINE 9 COL 1.
- 05 BIKE-INPUT PIC X(32) TO WS-BIKE-DESC LINE 9 COL 11.
- 05 PRICE-INPUT PIC 9(4)V99 TO WS-BIKE-PRICE LINE 9 COL 44.
- 05 VALUE "XXXXX to end accessories" LINE 10 COL 1.
- 05 VALUE "Accessory 1: " LINE 11 COL 1.
- *CAN I DO THE NESTED IF STATEMENTS IN HERE? IM NOT SURE HOW ELSE TO CHECK FOR 'XXXXX'
- 05 ACC1-INPUT PIC A(25) TO WS-ACC1 LINE 11 COL 14.
- 05 ACC1-PRICE-INPUT PIC 999V99 TO WS-ACC1-PRICE LINE 11 COL 44.
- 05 VALUE "Accessory 2: " LINE 12 COL 1.
- 05 ACC2-INPUT PIC A(25) TO WS-ACC2 LINE 12 COL 14.
- 05 ACC2-PRICE-INPUT PIC 999V99 TO WS-ACC2-PRICE LINE 12 COL 44.
- 05 VALUE "Accessory 3: " LINE 13 COL 1.
- 05 ACC3-INPUT PIC A(25) TO WS-ACC3 LINE 13 COL 14.
- 05 ACC3-PRICE-INPUT PIC 999V99 TO WS-ACC3-PRICE LINE 13 COL 44.
- 05 VALUE "Accessory 4: " LINE 14 COL 1.
- 05 ACC4-INPUT PIC A(25) TO WS-ACC4 LINE 14 COL 14.
- 05 ACC4-PRICE-INPUT PIC 999V99 TO WS-ACC4-PRICE LINE 14 COL 44.
- 05 VALUE "----------" LINE 15 COL 42.
- *I almost wonder if this should be a second screen, doing calculations and display after accepting values.
- 05 VALUE "Subtotal" LINE 16 COL 1.
- *need to input calculated subtotal now
- 05 VALUE "Discount" LINE 17 COL 1.
- 05 VALUE "----------" LINE 18 COL 42.
- 05 VALUE "Net Sale" LINE 19 COL 1.
- 05 VALUE "Sales Tax" LINE 20 COL 1.
- 05 VALUE "----------" LINE 21 COL 42.
- 05 VALUE "Invoice Total" LINE 22 COL 1.
- 05 VALUE "ENTER 'X' AND PRESS THE ENTER KEY TO EXIT THE PROGRAM... " LINE 23 COL 1.
- 05 INPUT-EXIT PIC X TO WS-EXIT.
- procedure division.
- MAIN.
- perform B-100
- UNTIL WS-EXIT = "X".
- stop run.
- B-100.
- DISPLAY Invoice-Screen.
- ACCEPT Invoice-Screen.
- goback.
- end program Program1.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement