Note that there are some explanatory texts on larger screens.

plurals
  1. POCOBOL Sort and Merge Concurrently
    primarykey
    data
    text
    <p>I am having a very difficult time with an assignment I have been given. I am to sort and merge two txt files filled with stock data. I am then to prompt the user to enter a year and the master record will print the records that are within that year. Can anyone please help me. This is what I currently have. </p> <pre><code> ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT STOCK-REPORT-A ASSIGN TO 'PR3AF11.TXT'. SELECT STOCK-REPORT-B ASSIGN TO 'PR3BF11.TXT'. SELECT MERGE-FILE ASSIGN TO 'WORK.TMP'. SELECT MASTER-STOCK-REPORT ASSIGN TO 'MASTERSTOCKREPORT.TXT'. DATA DIVISION. FILE SECTION. FD STOCK-REPORT-A. 01 REPORTA-REC. 05 A-InvestorID PIC X(2). 05 A-InvestorName PIC X(5). 05 A-InvestorRating PIC X. FD STOCK-REPORT-B. 01 REPORTB-REC. 05 B-InvestorID PIC X(2). 05 B-InvestorName PIC X(5). 05 B-InvestorRating PIC X. SD MERGE-FILE. 01 MERGE-REC. 05 M-InvestorID PIC X(2). 05 M-InvestorName PIC X(5). 05 M-InvestorRating PIC X. SCREEN SECTION. 01 TITLE SCREEN. 05 BLANK SCREEN FOREGROUND-COLOR BLACK BACKGROUND-COLOR WHITE. 05 LINE 4 COLUMN 15 VALUE "STOCKS REPORT GENERATOR" 01 YEAR-QUESTION-SCREEN. 05 YEAR-ANSWERS. 10 LINE 7 COLUMN 10 VALUE "What year would you like to search for?". 10 LINE 9 COLUMN 15 VALUE "2005". 10 LINE 9 COLUMN 15 VALUE "2006". 10 LINE 9 COLUMN 15 VALUE "2007". 10 LINE 9 COLUMN 15 VALUE "2008". 10 LINE 9 COLUMN 15 VALUE "2009". 10 LINE 9 COLUMN 15 VALUE "2010". 10 LINE 9 COLUMN 15 VALUE "2011". FD MASTER-STOCK-REPORT. 01 MASTER-REC PIC X(122). PROCEDURE DIVISION. 100-MAIN. BEGIN. MERGE MERGE-FILE ON ASCENDING KEY M-InvestorID USING STOCK-REPORT-A STOCK-REPORT-B GIVING MASTER-STOCK-REPORT. STOP RUN. </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload