LAB1B - 01 MISC. 05 EOF PIC X VALUE 'N'. 05 WS-VALUE PIC...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
*********************************************************** * THE PURPOSE OF THIS PROMGRAM IS TO PRINT AN * INVENTORY LISTING FOR AN OFFICE SUPPLY COMPANY. *********************************************************** IDENTIFICATION DIVISION. PROGRAM-ID. LAB1B. AUTHOR. L TRAVIS KEETON. DATE-WRITTEN. 01-11-2011. DATE-COMPILED. 01-11-2011. INSTALLATION. DEVRY. SECURITY. NONE. ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT INVENTORY-FILE ASSIGN TO DISK 'LAB1B.DAT' ORGANIZATION IS LINE SEQUENTIAL. SELECT PRINT-FILE ASSIGN TO PRINTER 'LAB1B.DOC'. DATA DIVISION. FILE SECTION. FD INVENTORY-FILE RECORD CONTAINS 42 CHARACTERS BLOCK CONTAINS 10 RECORDS. 01 INVENTORY-RECORD. 05 I-ITEM PIC 999. 05 I-DESC PIC X(30). 05 I-QOH PIC 9(4). 05 I-UPRICE PIC 9(3)V99. FD PRINT-FILE RECORD CONTAINS 76 CHARACTERS. 01 PRINT-RECORD PIC X(76). WORKING-STORAGE SECTION.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 01 MISC. 05 EOF PIC X VALUE 'N'. 05 WS-VALUE PIC 9(7)V99. 01 DL. 05 DL-ITEM PIC 999. 05 F PIC X(5). 05 DL-DESC PIC X(30). 05 F PIC X(5). 05 DL-UPRICE PIC ZZZ.99. 05 F PIC X(5). 05 DL-QOH PIC ZZZ9. 05 F PIC X(5). 05 DL-VALUE PIC $Z,ZZZ,ZZZ.99. PROCEDURE DIVISION. 000-MAIN. PERFORM 100-INITIAL. PERFORM 200-PROCESS UNTIL EOF ='Y'. PERFORM 900-TERM. STOP RUN. 100-INITIAL. OPEN INPUT INVENTORY-FILE, OUTPUT PRINT-FILE. PERFORM 700-READ. 200-PROCESS. MOVE I-ITEM TO DL-ITEM. MOVE I-DESC TO DL-DESC. MOVE I-UPRICE TO DL-UPRICE. MOVE I-QOH TO DL-QOH. MULTIPLY I-UPRICE BY I-QOH GIVING WS-VALUE. MOVE WS-VALUE TO DL-VALUE. WRITE PRINT-RECORD FROM DL AFTER ADVANCING 1 LINE. PERFORM 700-READ. 700-READ. READ INVENTORY-FILE AT END MOVE 'Y' TO EOF END-READ. 900-TERM. CLOSE INVENTORY-FILE, PRINT-FILE....
View Full Document

This note was uploaded on 10/09/2011 for the course CIS 355 taught by Professor Champion during the Summer '11 term at DeVry Columbus North.

Page1 / 2

LAB1B - 01 MISC. 05 EOF PIC X VALUE 'N'. 05 WS-VALUE PIC...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online