LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 04-17-2008, 08:45 PM   #1
JMJ_coder
Member
 
Registered: Apr 2006
Distribution: Fedora
Posts: 478

Rep: Reputation: 30
COBOL: Screen Section error


Hello,

I am writing COBOL code for the semester project for my Business Programming course and compiling on an iseries server. I am uncertain what compiler is installed.

I am trying to get the program to run interactively. At first I wrote a whole mess of DISPLAY lines in the PROCEDURE DIVISION:

Code:
DISPLAY "********** MAIN MENU **********"
      AT LINE 4
         COLUMN 6
      WITH BLANK SCREEN
DISPLAY "1: ENTER A NEW CUSTOMER FILE"
      AT LINE 8
         COLUMN 6
DISPLAY "2: PLACE A NEW ORDER"
      AT LINE 10
         COLUMN 6

... etc.

But, I got a bunch of errors. One error was expecting INTEGER-NUMBER and got '4'. Since when is 4 not an integer?
It gave me fits with the AT, COLUMN, WITH, BLANK, etc.


Then I decided to just define some screens. So in the DATA DIVISION, after the WORKING-STORAGE SECTION:

Code:
SCREEN SECTION.
01 SCREEN-1.
   05  BLANK SCREEN
       WITH FOREGROUND-COLOR 12
       WITH BACKGROUND-COLOR 4.
   05  LINE 4 COLUMN 6 VALUE "********** MAIN MENU **********"

...etc.
When I went to compile it gave me an error of SCREEN invalid, in reference to SCREEN SECTION.

I'm at a loss as to what is going on. I'm taking this stuff right out of the book for the course, but I can't get it to compile.

Any ideas?
 
Old 04-18-2008, 04:21 AM   #2
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 4&5, Fedora 10, CentOS 5.4, IPCop
Posts: 569

Rep: Reputation: 55
OK, I'm possibly the only COBOL programmer (professionally) that visits this forum . I need to know the flavour of COBOL you are using, so perhaps post some info about how you are compiling the source, what IDE (if any) you're using, etc. Any idea which COBOL you're compiling to? COBOL-74? COBOL-85? Later?

Is your SCREEN SECTION immediately before the PROCEDURE DIVISION? Do you have a LINKAGE SECTION? Perhaps email your source to me and I'll try to compile it myself

I'd love to help you out, so get back to me soon...
 
Old 04-18-2008, 10:40 AM   #3
JMJ_coder
Member
 
Registered: Apr 2006
Distribution: Fedora
Posts: 478

Original Poster
Rep: Reputation: 30
Hello,

Quote:
Originally Posted by blacky_5251 View Post
I need to know the flavour of COBOL you are using, so perhaps post some info about how you are compiling the source, what IDE (if any) you're using, etc. Any idea which COBOL you're compiling to? COBOL-74? COBOL-85? Later?
I don't know? It is whatever is installed on the system. I'm pretty sure it is at least COBOL-85 - and I got the impression it was the newest one prior to the new COBOL-2008 standard that is coming out (which the professor says they hope to have a new compiler for that soon).

The system is an AS/400 from IBM. The compiler is - I don't know. I do know that it wouldn't accept the CURRENT-DATE extension (that issue came up about a month ago).

The way it works is we write the program in the SEU text editor (I write it with VIM on my home computer and ftp to the server). Then we compile with the COBOL compiler with CRTCBLPGM at the main system screen. The newest copyright listed is 2003.

This is the University AS/400 server, so I don't know how to find the version of these things (if it were UNIX, which I know much better, that would be different).


Quote:
Originally Posted by blacky_5251 View Post
Is your SCREEN SECTION immediately before the PROCEDURE DIVISION? Do you have a LINKAGE SECTION? Perhaps email your source to me and I'll try to compile it myself
I placed the SCREEN SECTION immmediately before the PROCEDURE DIVISION. What is a LINKAGE SECTION?

Here is the complete code, that I have so far:

Code:
       IDENTIFICATION DIVISION.
       PROGRAM-ID. SJPINFOSYS.
      ***************************************************
      *                                                 *
      *  CIS 3741 FINAL PROJECT                         *
      *                                                 *
      *  CREATED APRIL 4, 2008                          *
      *                                                 *
      ***************************************************
       ENVIRONMENT DIVISION.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT SJP-CUSTOMER-INFORMATION-FILE
               ASSIGN TO DISK-SJPCUSTINF.
           SELECT SJP-DATE
               ASSIGN TO DISK-SJPDATE.
           SELECT SJP-MAILING-LIST
               ASSIGN TO DISK-SJPMAILING.
           SELECT SJP-NEXT-CUSTOMER-CODE
               ASSIGN TO DISK-SJPNEXTCUS.
           SELECT SJP-NEXT-PO-NUMBER
               ASSIGN TO DISK-SJPNEXTPO.
           SELECT SJP-PURCHASING-ORDERS
               ASSIGN TO DISK-SJPORDERS.
           SELECT SJP-ORDER-INFORMATION
               ASSIGN TO DISK-SJPORDINF.
           SELECT SJP-DAILY-OUTSTANDING-ORDERS
               ASSIGN TO DISK-SJPOUTORD.
           SELECT SJP-PRODUCT-TABLE
               ASSIGN TO DISK-SJPPRODUCT.
           SELECT SJP-MAILING-LABELS
               ASSIGN TO PRINTER-QPRINT.
           SELECT SJP-OUTSTANDING-ORDERS-REPORT
               ASSIGN TO PRINTER-QPRINT.
           SELECT SJP-ORDER-FORM
               ASSIGN TO PRINTER-QPRINT.
      ***************************************************
      *                                                 *
      *  THIS DIVISION WILL DEFINE ALL STORAGE BEING    *
      *  READ IN BY THE FILES, BEING OUTPUTED TO FILES  *
      *  AND BEING USED BY THE PROGRAM                  *
      *                                                 *
      ***************************************************
       DATA DIVISION.
       FILE SECTION.
       FD  SJP-CUSTOMER-INFORMATION-FILE.
       01  CUSTOMER-RECORD-IN.
           05  CUSTOMER-CODE             PIC 9(5).
           05  CUSTOMER-NAME             PIC X(40).
           05  STREET                    PIC X(40).
           05  CITY                      PIC X(20).
           05  STATE                     PIC X(4).
           05  ZIPCODE                   PIC X(5).
           05  TELEPHONE-NUMBER          PIC X(10).
           05  EMAIL-ADDRESS             PIC X(60).
       FD  SJP-DATE.   
       01  LAST-DATE.
           05  LAST-DATE-RUN             PIC 9(6).
       FD  SJP-MAILING-LIST.
       01  MAILING-LIST-IN.
           05  MAIL-LIST-CUSTOMER-CODE   PIC 9(5).
           05  MAIL-LIST-CUSTOMER-NAME   PIC X(40).
           05  MAIL-LIST-STREET          PIC X(40).
           05  MAIL-LIST-CITY            PIC X(20).
           05  MAIL-LIST-STATE           PIC X(4).
           05  MAIL-LIST-ZIPCODE         PIC X(5).
           05  MAIL-LIST-SHIPPED         PIC X.
       FD  SJP-NEXT-CUSTOMER-CODE. 
       01  NEXT-CUSTOMER-CODE.
           05  NEXT-CUSTOMER-CODE-NUMBER PIC 9(5).
       FD  SJP-NEXT-PO-NUMBER.
       01  NEXT-PO-NUMBER.
           05  NEXT-PO-NUMBER-DATE       PIC 9(6).
           05  NEXT-PO-NUMBER-NUMBER     PIC 9(4).
       FD  SJP-PURCHASING-ORDERS.
       01  PURCHASING-ORDERS.
           05  ORDERS-PO-NUMBER          PIC 9(10).
           05  ORDERS-CUSTOMER-CODE      PIC 9(5).
           05  ORDERS-ORDER-DATE         PIC 9(6).
           05  ORDERS-HAS-SHIPPED        PIC X.
           05  ORDERS-SHIPPING-DATE      PIC 9(6).
           05  ORDERS-TOTAL-ORDER-PRICE  PIC 999999V99.
       FD  SJP-ORDER-INFORMATION.
       01  ORDER-INFORMATION.
           05  ORDER-INFO-PO-NUMBER      PIC 9(10).
           05  ORDER-INFO-PRODUCT-CODE   PIC X(5).
           05  ORDER-INFO-QUANTITY       PIC 9(4).
           05  ORDER-INFO-PRODUCT-PRICE  PIC 999999V99.
       FD  SJP-DAILY-OUTSTANDING-ORDERS.
       01  DAILY-OUTSTANDING-ORDERS.
           05  OUT-ORDERS-PO-NUMBER      PIC 9(10).
           05  OUT-ORDERS-CUSTOMER-CODE  PIC 9(5).
           05  OUT-ORDERS-PRODUCT-CODE   PIC X(5).
           05  OUT-ORDERS-QUANTITY       PIC 9(4).
           05  OUT-ORDERS-HAS-SHIPPED    PIC X.
       FD  SJP-PRODUCT-TABLE.
       01  SJP-PRODUCTS                  PIC X(70).
       FD  SJP-MAILING-LABELS.
       01  MAILING-LABELS-LINE-OUT       PIC X(70).
       FD  SJP-OUTSTANDING-ORDERS-REPORT.
       01  OUTSTANDING-ORDERS-LINE-OUT   PIC X(100).
       FD  SJP-ORDER-FORM.
       01  ORDER-FORM-LINE-OUT           PIC X(100).
      ***************************************************
      *                                                 *
      *  ALL VARIABLES THAT ARE READ IN FROM OR         *
      *  WRITTEN TO A FILE WILL BE DECLARED IN THIS     *
      *  WORKING-STORAGE SECTION                        *
      *                                                 *
      ***************************************************
       WORKING-STORAGE SECTION.
       01  WORK-AREA.
           05  LINE-NUMBER               PIC 99          VALUE 1.
           05  ANOTHER-DATE              PIC XXX         VALUE "YES".
           05  ANOTHER-NUMBER            PIC XXX         VALUE "YES".
           05  MORE-PRODUCTS             PIC XXX         VALUE "YES".
           05  MORE-OUTSTANDING-ORDERS   PIC XXX         VALUE "YES".
           05  MORE-MAILING-LABELS       PIC XXX         VALUE "YES".
           05  MAILING-LINE-COUNT        PIC 99          VALUE 99.
           05  OUT-ORDERS-LINE-COUNT     PIC 99          VALUE 90.
           05  LAST-PO-NUMBER            PIC 9(10)       VALUE ZEROS.
       01  THE-CURRENT-DATE.
           05  THE-YEAR                  PIC 99.
           05  THE-MONTH                 PIC 99.
           05  THE-DAY                   PIC 99.
       01  TABLE1.
           05  PRODUCT-TABLE OCCURS 24 TIMES INDEXED BY X.
               10  PRODUCT-CODE          PIC X(5).
               10  PRODUCT-DESC          PIC X(60).
               10  PRODUCT-UNITPRICE     PIC 999V99.
       01  MAILING-LABELS-HEADING. 
           05  MAILING-MONTH-OUT         PIC 99.
           05                            PIC X           VALUE "/".
           05  MAILING-DAY-OUT           PIC 99.
           05                            PIC X           VALUE "/".
           05  MAILING-YEAR-OUT          PIC 99. 
           05                            PIC X(15)       VALUE SPACES.
           05                            PIC X(20)       VALUE
               "DAILY MAILING LABELS".
           05                            PIC X(15)       VALUE SPACES.
           05                            PIC X(5)        VALUE "PAGE ".
           05  MAILING-PAGE-NUMBER       PIC 999         VALUE ZEROS.
       01  OUTSTANDING-ORDERS-HEADING.
           05  OUT-ORDERS-MONTH-OUT      PIC 99.
           05                            PIC X           VALUE "/".
           05  OUT-ORDERS-DAY-OUT        PIC 99.
           05                            PIC X           VALUE "/".
           05  OUT-ORDERS-YEAR-OUT       PIC 99. 
           05                            PIC X(15)       VALUE SPACES.
           05                            PIC X(24)       VALUE
               "DAILY OUTSTANDING ORDERS".
           05                            PIC X(15)       VALUE SPACES.
           05                            PIC X(5)        VALUE "PAGE ".
           05  OUT-ORDERS-PAGE-NUMBER    PIC 999         VALUE ZEROS.
       01  OUTSTANDING-ORDERS-ORDER.
           05                            PIC X(13)       VALUE
               "P.O. NUMBER: ".
           05  OUT-ORDERS-PO-NUMBER-OUT  PIC 9(10).
           05                            PIC X(20)       VALUE 
               "     CUSTOMER CODE: ".
           05  OUT-ORDERS-CUST-CODE-OUT  PIC 9(5).
       01  OUTSTANDING-ORDERS-SUBORDER.
           05                            PIC X(5)       VALUE SPACES.
           05  OUT-ORDERS-PRODCODE-OUT   PIC X(5).
           05                            PIC X(3)       VALUE
               " - ".
           05  OUT-ORDERS-PRODDESC-OUT   PIC X(60).
           05  OUT-ORDERS-QUANTITY-OUT   PIC 9(4).
       01  MAILING-LABELS-RECORD-1.
           05  MAILING-CUSTOMER-NAME-OUT PIC X(40).
           05                            PIC X(10)       VALUE SPACES.
           05  MAILING-CUSTOMER-CODE-OUT PIC 9(5).
       01  MAILING-LABELS-RECORD-2.
           05  MAILING-STREET-OUT        PIC X(40).
       01  MAILING-LABELS-RECORD-3.
           05  MAILING-CITY-OUT          PIC X(20).
           05                            PIC XX          VALUE ", ".
           05  MAILING-STATE-OUT         PIC X(2).
           05                            PIC X           VALUE SPACES.
           05  MAILING-ZIPCODE-OUT       PIC X(5).
       01  USER-KEYED-IN-DATA.
           05  MENU-CHOICE               PIC X.
      ***************************************************
      *                                                 *
      *  THIS SECTION WILL DEFINE THE VARIOUS SCREENS   *
      *  USED FOR INTERACTIVE PROCESSING IN THE PROGRAM *
      *                                                 *
      ***************************************************
       SCREEN SECTION.
       01  SCREEN-1.
           05  BLANK SCREEN
               FOREGROUND-COLOR 13
               BACKGROUND-COLOR 2
           05  LINE  1 COLUMN 6 VALUE "********** MAIN MENU **********"
           05  LINE  4 COLUMN 6 VALUE "1: ENTER A NEW CUSTOMER ACCOUNT"
           05  LINE  6 COLUMN 6 VALUE "2: PLACE A NEW PURCHASING ORDER"
           05  LINE  8 COLUMN 6 VALUE "3: UPDATE SHIPPING STATUS"
           05  LINE 10 COLUMN 6 VALUE "4: GET CUSTOMER ORDER HISTORY"
           05  LINE 14 COLUMN 6 VALUE "0: EXIT PROGRAM"
           05  LINE 20 COLUMN 6 VALUE "ENTER SELECTION: "
           05  COLUMN 24 PIC X TO MENU-CHOICE.
      ***************************************************
      *                                                 *
      *  THIS DIVISION WILL DO ALL THE COMPUTATIONS     *
      *  AND PROCESS ALL THE DATA FOR THE PROGRAM       *
      *                                                 *
      ***************************************************
       PROCEDURE DIVISION.
      ***************************************************
      *                                                 *
      *  THIS MODULE WILL BE THE MAIN PROGRAM           *
      *  IT WILL CALL FOR ALL OTHER MAJOR MODULES       *
      *                                                 *
      ***************************************************
       000-MAIN-MODULE.
           PERFORM 100-INITIALIZE
           PERFORM 200-PRINT-MENU
           STOP RUN.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL INITIALIZE THE FILES TO BE USED   *
      *  FOR THE BATCH PROCESSING ON EVERY MORNING AND      *
      *  SET THE VARIABLE FOR THE DATE, ANALYZE IF IT IS A  *
      *  NEW DATE, AND IF IT IS PROCESS THE BATCH OPERATIONS*
      *  TO CREATE A DAILY OUTSTANDING ORDERS FORM, DAILY   *
      *  MAILING LABELS, RESET THE PONUMBERS, AND PUT THE   *
      *  PRODUCT FILE INTO A TABLE                          *
      *                                                     *
      *******************************************************
       100-INITIALIZE.
           OPEN INPUT  SJP-MAILING-LIST
                       SJP-DAILY-OUTSTANDING-ORDERS
                I-O    SJP-DATE
                OUTPUT SJP-MAILING-LABELS
                       SJP-OUTSTANDING-ORDERS-REPORT
           PERFORM 140-CREATE-PRODUCT-TABLE
           ACCEPT THE-CURRENT-DATE FROM DATE
           READ SJP-DATE
                AT END MOVE "NO " TO ANOTHER-DATE
           END-READ
                IF LAST-DATE-RUN < THE-CURRENT-DATE
                    PERFORM UNTIL MORE-OUTSTANDING-ORDERS = "NO "
                         READ SJP-DAILY-OUTSTANDING-ORDERS
                              AT END MOVE "NO " 
                                  TO MORE-OUTSTANDING-ORDERS
                              NOT AT END 
                                  PERFORM 110-DAILY-OUTSTANDING-ORDERS
                         END-READ
                    END-PERFORM
                    PERFORM UNTIL MORE-MAILING-LABELS = "NO "
                         READ SJP-MAILING-LIST
                              AT END MOVE "NO " TO MORE-MAILING-LABELS
                              NOT AT END 
                                  PERFORM 120-DAILY-MAILING-LABELS
                         END-READ
                    END-PERFORM
                    PERFORM 130-RESET-PO-NUMBER
                    MOVE THE-CURRENT-DATE TO LAST-DATE-RUN
                    REWRITE LAST-DATE
                END-IF
           CLOSE SJP-DATE
                 SJP-DAILY-OUTSTANDING-ORDERS
                 SJP-MAILING-LABELS
                 SJP-MAILING-LIST
                 SJP-OUTSTANDING-ORDERS-REPORT.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL CREATE THE DAILY OUTSTANDING      *
      *  ORDERS REPORT THAT WILL SHOW WHAT ORDERS NEED TO   *
      *  BE SHIPPED OUT THAT DAY                            *
      *                                                     *
      *******************************************************
       110-DAILY-OUTSTANDING-ORDERS.
           MOVE THE-YEAR  TO OUT-ORDERS-YEAR-OUT
           MOVE THE-MONTH TO OUT-ORDERS-MONTH-OUT
           MOVE THE-DAY   TO OUT-ORDERS-DAY-OUT
           MOVE OUT-ORDERS-PO-NUMBER     TO OUT-ORDERS-PO-NUMBER-OUT
           MOVE OUT-ORDERS-CUSTOMER-CODE TO OUT-ORDERS-CUST-CODE-OUT
           MOVE OUT-ORDERS-PRODUCT-CODE  TO OUT-ORDERS-PRODCODE-OUT
           MOVE OUT-ORDERS-QUANTITY      TO OUT-ORDERS-QUANTITY-OUT
           IF OUT-ORDERS-PO-NUMBER NOT = LAST-PO-NUMBER
                PERFORM 111-PRINT-ORDER-HEADING
           END-IF
           SET X TO 1
           SEARCH PRODUCT-TABLE
                AT END MOVE SPACES TO OUT-ORDERS-PRODDESC-OUT
                WHEN OUT-ORDERS-PRODUCT-CODE = PRODUCT-CODE(X)
                     MOVE PRODUCT-DESC(X) TO OUT-ORDERS-PRODDESC-OUT
           END-SEARCH
           WRITE OUTSTANDING-ORDERS-LINE-OUT 
                      FROM OUTSTANDING-ORDERS-SUBORDER
                AFTER ADVANCING 1 LINE
           ADD 1 TO OUT-ORDERS-LINE-COUNT.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL PRINT THE HEADINGS FOR EACH NEW   *
      *  ORDER FOR THE DAILY OUTSTANDING ORDERS             *
      *                                                     *
      *******************************************************
       111-PRINT-ORDER-HEADING.
           MOVE SPACES TO OUTSTANDING-ORDERS-LINE-OUT 
           WRITE OUTSTANDING-ORDERS-LINE-OUT
                AFTER ADVANCING 1 LINE
           ADD 1 TO OUT-ORDERS-LINE-COUNT
           IF OUT-ORDERS-LINE-COUNT > 60
                PERFORM 115-PRINT-OUT-ORDERS-HEADINGS
           END-IF
           WRITE OUTSTANDING-ORDERS-LINE-OUT 
                      FROM OUTSTANDING-ORDERS-ORDER
           MOVE OUT-ORDERS-PO-NUMBER TO LAST-PO-NUMBER.            
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL PRINT THE HEADINGS FOR THE        *
      *  DAILY MAILING LABELS                               *
      *                                                     *
      *******************************************************
       115-PRINT-OUT-ORDERS-HEADINGS.
           ADD   1      TO   OUT-ORDERS-PAGE-NUMBER
           MOVE  ZEROS  TO   OUT-ORDERS-LINE-COUNT
           WRITE OUTSTANDING-ORDERS-LINE-OUT 
                        FROM OUTSTANDING-ORDERS-HEADING
                 AFTER ADVANCING PAGE
           MOVE  SPACES TO   OUTSTANDING-ORDERS-LINE-OUT
           WRITE OUTSTANDING-ORDERS-LINE-OUT
                 AFTER ADVANCING 1 LINE.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL CREATE THE DAILY MAILING LABELS   *
      *  FOR ALL THE OUTSTANDING ORDERS THAT NEED TO BE     *
      *  SHIPPED OUT THAT DAY                               *
      *                                                     *
      *******************************************************
       120-DAILY-MAILING-LABELS.
           MOVE THE-YEAR  TO MAILING-YEAR-OUT
           MOVE THE-MONTH TO MAILING-MONTH-OUT
           MOVE THE-DAY   TO MAILING-DAY-OUT
           MOVE MAIL-LIST-CUSTOMER-NAME TO MAILING-CUSTOMER-NAME-OUT
           MOVE MAIL-LIST-CUSTOMER-CODE TO MAILING-CUSTOMER-CODE-OUT
           MOVE MAIL-LIST-STREET        TO MAILING-STREET-OUT
           MOVE MAIL-LIST-CITY          TO MAILING-CITY-OUT
           MOVE MAIL-LIST-STATE         TO MAILING-STATE-OUT
           MOVE MAIL-LIST-ZIPCODE       TO MAILING-ZIPCODE-OUT
           IF MAILING-LINE-COUNT > 60
               PERFORM 125-PRINT-MAILING-HEADINGS
           END-IF
           WRITE MAILING-LABELS-LINE-OUT FROM MAILING-LABELS-RECORD-1 
                 AFTER ADVANCING 1 LINE
           WRITE MAILING-LABELS-LINE-OUT FROM MAILING-LABELS-RECORD-2 
                 AFTER ADVANCING 1 LINE
           WRITE MAILING-LABELS-LINE-OUT FROM MAILING-LABELS-RECORD-3 
                 AFTER ADVANCING 1 LINE
           MOVE SPACES TO MAILING-LABELS-LINE-OUT
           WRITE MAILING-LABELS-LINE-OUT
                 AFTER ADVANCING 1 LINE
           ADD 4 TO MAILING-LINE-COUNT.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL PRINT THE HEADINGS FOR THE        *
      *  DAILY MAILING LABELS                               *
      *                                                     *
      *******************************************************
       125-PRINT-MAILING-HEADINGS.
           ADD   1      TO MAILING-PAGE-NUMBER
           MOVE  ZEROS  TO MAILING-LINE-COUNT
           WRITE MAILING-LABELS-LINE-OUT FROM MAILING-LABELS-HEADING
                 AFTER ADVANCING PAGE
           MOVE  SPACES TO MAILING-LABELS-LINE-OUT
           WRITE MAILING-LABELS-LINE-OUT
                 AFTER ADVANCING 1 LINE.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL RESET THE 4 DIGIT PO NUMBER       *
      *  THAT WILL BE COMBINED WITH THE DATE TO PRODUCE     *
      *  A UNIQUE 10 DIGIT PO NUMBER IN THE FORM YYMMDDPONO *
      *                                                     *
      *******************************************************
       130-RESET-PO-NUMBER.
           OPEN I-O SJP-NEXT-PO-NUMBER
           READ SJP-NEXT-PO-NUMBER
                AT END MOVE "NO " TO ANOTHER-NUMBER
           END-READ
           MOVE THE-CURRENT-DATE TO NEXT-PO-NUMBER-DATE
           MOVE ZEROS TO NEXT-PO-NUMBER-NUMBER
           REWRITE NEXT-PO-NUMBER
           CLOSE SJP-NEXT-PO-NUMBER.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL CREATE THE PRODUCT TABLE FOR      *
      *  RAPID ACCESS WITHIN THE PROGRAM                    *
      *                                                     *
      *******************************************************
       140-CREATE-PRODUCT-TABLE.
           OPEN INPUT SJP-PRODUCT-TABLE
           SET X TO 1
           PERFORM UNTIL X > 24
               READ SJP-PRODUCT-TABLE INTO PRODUCT-TABLE(X)
                    AT END MOVE "NO " TO MORE-PRODUCTS
               END-READ
               SET X UP BY 1
           END-PERFORM
           CLOSE SJP-PRODUCT-TABLE.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL PRINT THE MAIN MENU ON THE SCREEN *
      *                                                     *
      *******************************************************
       200-PRINT-MENU.
           DISPLAY SCREEN-1
           ACCEPT  SCREEN-1.
It compiles and runs properly if I leave out the SCREEN SECTION and the 200-Print-Menu module.

Any help would be appreciated.
 
Old 04-18-2008, 04:50 PM   #4
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 4&5, Fedora 10, CentOS 5.4, IPCop
Posts: 569

Rep: Reputation: 55
Only 1 of your"05" level entries in the screen section (the last one) are correctly terminated with a period. Add a period to the end of each and try again.

PS: If God is love!, then COBOL ain't Heaven

Last edited by blacky_5251; 04-18-2008 at 05:13 PM.
 
Old 04-18-2008, 06:46 PM   #5
JMJ_coder
Member
 
Registered: Apr 2006
Distribution: Fedora
Posts: 478

Original Poster
Rep: Reputation: 30
Hello,

Quote:
Originally Posted by blacky_5251 View Post
Only 1 of your"05" level entries in the screen section (the last one) are correctly terminated with a period. Add a period to the end of each and try again.

PS: If God is love!, then COBOL ain't Heaven
I did as you suggested and still a slew of error messages (same ones). I would post them if I could figure out how to save or copy a printer spool file on the AS/400 to a regular file.

PS: That's a good one!
 
Old 04-18-2008, 09:25 PM   #6
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 4&5, Fedora 10, CentOS 5.4, IPCop
Posts: 569

Rep: Reputation: 55
Can you repost your source please? This is the source that I was able to compile without any errors:-
Code:
       IDENTIFICATION DIVISION.
       PROGRAM-ID. SJPINFOSYS.
      ***************************************************
      *                                                 *
      *  CIS 3741 FINAL PROJECT                         *
      *                                                 *
      *  CREATED APRIL 4, 2008                          *
      *                                                 *
      ***************************************************
       ENVIRONMENT DIVISION.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT SJP-CUSTOMER-INFORMATION-FILE
               ASSIGN TO DISK-SJPCUSTINF.
           SELECT SJP-DATE
               ASSIGN TO DISK-SJPDATE.
           SELECT SJP-MAILING-LIST
               ASSIGN TO DISK-SJPMAILING.
           SELECT SJP-NEXT-CUSTOMER-CODE
               ASSIGN TO DISK-SJPNEXTCUS.
           SELECT SJP-NEXT-PO-NUMBER
               ASSIGN TO DISK-SJPNEXTPO.
           SELECT SJP-PURCHASING-ORDERS
               ASSIGN TO DISK-SJPORDERS.
           SELECT SJP-ORDER-INFORMATION
               ASSIGN TO DISK-SJPORDINF.
           SELECT SJP-DAILY-OUTSTANDING-ORDERS
               ASSIGN TO DISK-SJPOUTORD.
           SELECT SJP-PRODUCT-TABLE
               ASSIGN TO DISK-SJPPRODUCT.
           SELECT SJP-MAILING-LABELS
               ASSIGN TO PRINTER-QPRINT.
           SELECT SJP-OUTSTANDING-ORDERS-REPORT
               ASSIGN TO PRINTER-QPRINT.
           SELECT SJP-ORDER-FORM
               ASSIGN TO PRINTER-QPRINT.
      ***************************************************
      *                                                 *
      *  THIS DIVISION WILL DEFINE ALL STORAGE BEING    *
      *  READ IN BY THE FILES, BEING OUTPUTED TO FILES  *
      *  AND BEING USED BY THE PROGRAM                  *
      *                                                 *
      ***************************************************
       DATA DIVISION.
       FILE SECTION.
       FD  SJP-CUSTOMER-INFORMATION-FILE.
       01  CUSTOMER-RECORD-IN.
           05  CUSTOMER-CODE             PIC 9(5).
           05  CUSTOMER-NAME             PIC X(40).
           05  STREET                    PIC X(40).
           05  CITY                      PIC X(20).
           05  STATE                     PIC X(4).
           05  ZIPCODE                   PIC X(5).
           05  TELEPHONE-NUMBER          PIC X(10).
           05  EMAIL-ADDRESS             PIC X(60).
       FD  SJP-DATE.
       01  LAST-DATE.
           05  LAST-DATE-RUN             PIC 9(6).
       FD  SJP-MAILING-LIST.
       01  MAILING-LIST-IN.
           05  MAIL-LIST-CUSTOMER-CODE   PIC 9(5).
           05  MAIL-LIST-CUSTOMER-NAME   PIC X(40).
           05  MAIL-LIST-STREET          PIC X(40).
           05  MAIL-LIST-CITY            PIC X(20).
           05  MAIL-LIST-STATE           PIC X(4).
           05  MAIL-LIST-ZIPCODE         PIC X(5).
           05  MAIL-LIST-SHIPPED         PIC X.
       FD  SJP-NEXT-CUSTOMER-CODE.
       01  NEXT-CUSTOMER-CODE.
           05  NEXT-CUSTOMER-CODE-NUMBER PIC 9(5).
       FD  SJP-NEXT-PO-NUMBER.
       01  NEXT-PO-NUMBER.
           05  NEXT-PO-NUMBER-DATE       PIC 9(6).
           05  NEXT-PO-NUMBER-NUMBER     PIC 9(4).
       FD  SJP-PURCHASING-ORDERS.
       01  PURCHASING-ORDERS.
           05  ORDERS-PO-NUMBER          PIC 9(10).
           05  ORDERS-CUSTOMER-CODE      PIC 9(5).
           05  ORDERS-ORDER-DATE         PIC 9(6).
           05  ORDERS-HAS-SHIPPED        PIC X.
           05  ORDERS-SHIPPING-DATE      PIC 9(6).
           05  ORDERS-TOTAL-ORDER-PRICE  PIC 999999V99.
       FD  SJP-ORDER-INFORMATION.
       01  ORDER-INFORMATION.
           05  ORDER-INFO-PO-NUMBER      PIC 9(10).
           05  ORDER-INFO-PRODUCT-CODE   PIC X(5).
           05  ORDER-INFO-QUANTITY       PIC 9(4).
           05  ORDER-INFO-PRODUCT-PRICE  PIC 999999V99.
       FD  SJP-DAILY-OUTSTANDING-ORDERS.
       01  DAILY-OUTSTANDING-ORDERS.
           05  OUT-ORDERS-PO-NUMBER      PIC 9(10).
           05  OUT-ORDERS-CUSTOMER-CODE  PIC 9(5).
           05  OUT-ORDERS-PRODUCT-CODE   PIC X(5).
           05  OUT-ORDERS-QUANTITY       PIC 9(4).
           05  OUT-ORDERS-HAS-SHIPPED    PIC X.
       FD  SJP-PRODUCT-TABLE.
       01  SJP-PRODUCTS                  PIC X(70).
       FD  SJP-MAILING-LABELS.
       01  MAILING-LABELS-LINE-OUT       PIC X(70).
       FD  SJP-OUTSTANDING-ORDERS-REPORT.
       01  OUTSTANDING-ORDERS-LINE-OUT   PIC X(100).
       FD  SJP-ORDER-FORM.
       01  ORDER-FORM-LINE-OUT           PIC X(100).
      ***************************************************
      *                                                 *
      *  ALL VARIABLES THAT ARE READ IN FROM OR         *
      *  WRITTEN TO A FILE WILL BE DECLARED IN THIS     *
      *  WORKING-STORAGE SECTION                        *
      *                                                 *
      ***************************************************
       WORKING-STORAGE SECTION.
       01  WORK-AREA.
           05  LINE-NUMBER               PIC 99          VALUE 1.
           05  ANOTHER-DATE              PIC XXX         VALUE "YES".
           05  ANOTHER-NUMBER            PIC XXX         VALUE "YES".
           05  MORE-PRODUCTS             PIC XXX         VALUE "YES".
           05  MORE-OUTSTANDING-ORDERS   PIC XXX         VALUE "YES".
           05  MORE-MAILING-LABELS       PIC XXX         VALUE "YES".
           05  MAILING-LINE-COUNT        PIC 99          VALUE 99.
           05  OUT-ORDERS-LINE-COUNT     PIC 99          VALUE 90.
           05  LAST-PO-NUMBER            PIC 9(10)       VALUE ZEROS.
       01  THE-CURRENT-DATE.
           05  THE-YEAR                  PIC 99.
           05  THE-MONTH                 PIC 99.
           05  THE-DAY                   PIC 99.
       01  TABLE1.
           05  PRODUCT-TABLE OCCURS 24 TIMES INDEXED BY X.
               10  PRODUCT-CODE          PIC X(5).
               10  PRODUCT-DESC          PIC X(60).
               10  PRODUCT-UNITPRICE     PIC 999V99.
       01  MAILING-LABELS-HEADING.
           05  MAILING-MONTH-OUT         PIC 99.
           05                            PIC X           VALUE "/".
           05  MAILING-DAY-OUT           PIC 99.
           05                            PIC X           VALUE "/".
           05  MAILING-YEAR-OUT          PIC 99.
           05                            PIC X(15)       VALUE SPACES.
           05                            PIC X(20)       VALUE
               "DAILY MAILING LABELS".
           05                            PIC X(15)       VALUE SPACES.
           05                            PIC X(5)        VALUE "PAGE ".
           05  MAILING-PAGE-NUMBER       PIC 999         VALUE ZEROS.
       01  OUTSTANDING-ORDERS-HEADING.
           05  OUT-ORDERS-MONTH-OUT      PIC 99.
           05                            PIC X           VALUE "/".
           05  OUT-ORDERS-DAY-OUT        PIC 99.
           05                            PIC X           VALUE "/".
           05  OUT-ORDERS-YEAR-OUT       PIC 99.
           05                            PIC X(15)       VALUE SPACES.
           05                            PIC X(24)       VALUE
               "DAILY OUTSTANDING ORDERS".
           05                            PIC X(15)       VALUE SPACES.
           05                            PIC X(5)        VALUE "PAGE ".
           05  OUT-ORDERS-PAGE-NUMBER    PIC 999         VALUE ZEROS.
       01  OUTSTANDING-ORDERS-ORDER.
           05                            PIC X(13)       VALUE
               "P.O. NUMBER: ".
           05  OUT-ORDERS-PO-NUMBER-OUT  PIC 9(10).
           05                            PIC X(20)       VALUE
               "     CUSTOMER CODE: ".
           05  OUT-ORDERS-CUST-CODE-OUT  PIC 9(5).
       01  OUTSTANDING-ORDERS-SUBORDER.
           05                            PIC X(5)       VALUE SPACES.
           05  OUT-ORDERS-PRODCODE-OUT   PIC X(5).
           05                            PIC X(3)       VALUE
               " - ".
           05  OUT-ORDERS-PRODDESC-OUT   PIC X(60).
           05  OUT-ORDERS-QUANTITY-OUT   PIC 9(4).
       01  MAILING-LABELS-RECORD-1.
           05  MAILING-CUSTOMER-NAME-OUT PIC X(40).
           05                            PIC X(10)       VALUE SPACES.
           05  MAILING-CUSTOMER-CODE-OUT PIC 9(5).
       01  MAILING-LABELS-RECORD-2.
           05  MAILING-STREET-OUT        PIC X(40).
       01  MAILING-LABELS-RECORD-3.
           05  MAILING-CITY-OUT          PIC X(20).
           05                            PIC XX          VALUE ", ".
           05  MAILING-STATE-OUT         PIC X(2).
           05                            PIC X           VALUE SPACES.
           05  MAILING-ZIPCODE-OUT       PIC X(5).
       01  USER-KEYED-IN-DATA.
           05  MENU-CHOICE               PIC X.
      ***************************************************
      *                                                 *
      *  THIS SECTION WILL DEFINE THE VARIOUS SCREENS   *
      *  USED FOR INTERACTIVE PROCESSING IN THE PROGRAM *
      *                                                 *
      ***************************************************
       SCREEN SECTION.
       01  SCREEN-1.
           05  BLANK SCREEN
               FOREGROUND-COLOR 13
               BACKGROUND-COLOR 2.
           05  LINE  1 COLUMN 6 VALUE "********** MAIN MENU **********".
           05  LINE  4 COLUMN 6 VALUE "1: ENTER A NEW CUSTOMER ACCOUNT".
           05  LINE  6 COLUMN 6 VALUE "2: PLACE A NEW PURCHASING ORDER".
           05  LINE  8 COLUMN 6 VALUE "3: UPDATE SHIPPING STATUS".
           05  LINE 10 COLUMN 6 VALUE "4: GET CUSTOMER ORDER HISTORY".
           05  LINE 14 COLUMN 6 VALUE "0: EXIT PROGRAM".
           05  LINE 20 COLUMN 6 VALUE "ENTER SELECTION: ".
           05  COLUMN 24 PIC X TO MENU-CHOICE.
      ***************************************************
      *                                                 *
      *  THIS DIVISION WILL DO ALL THE COMPUTATIONS     *
      *  AND PROCESS ALL THE DATA FOR THE PROGRAM       *
      *                                                 *
      ***************************************************
       PROCEDURE DIVISION.
      ***************************************************
      *                                                 *
      *  THIS MODULE WILL BE THE MAIN PROGRAM           *
      *  IT WILL CALL FOR ALL OTHER MAJOR MODULES       *
      *                                                 *
      ***************************************************
       000-MAIN-MODULE.
           PERFORM 100-INITIALIZE
           PERFORM 200-PRINT-MENU
           STOP RUN.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL INITIALIZE THE FILES TO BE USED   *
      *  FOR THE BATCH PROCESSING ON EVERY MORNING AND      *
      *  SET THE VARIABLE FOR THE DATE, ANALYZE IF IT IS A  *
      *  NEW DATE, AND IF IT IS PROCESS THE BATCH OPERATIONS*
      *  TO CREATE A DAILY OUTSTANDING ORDERS FORM, DAILY   *
      *  MAILING LABELS, RESET THE PONUMBERS, AND PUT THE   *
      *  PRODUCT FILE INTO A TABLE                          *
      *                                                     *
      *******************************************************
       100-INITIALIZE.
           OPEN I-O    SJP-MAILING-LIST
                       SJP-DAILY-OUTSTANDING-ORDERS
                I-O    SJP-DATE
                OUTPUT SJP-MAILING-LABELS
                       SJP-OUTSTANDING-ORDERS-REPORT
           PERFORM 140-CREATE-PRODUCT-TABLE
           ACCEPT THE-CURRENT-DATE FROM DATE
           READ SJP-DATE
                AT END MOVE "NO " TO ANOTHER-DATE
           END-READ
                IF LAST-DATE-RUN < THE-CURRENT-DATE
                    PERFORM UNTIL MORE-OUTSTANDING-ORDERS = "NO "
                         READ SJP-DAILY-OUTSTANDING-ORDERS
                              AT END MOVE "NO "
                                  TO MORE-OUTSTANDING-ORDERS
                              NOT AT END
                                  PERFORM 110-DAILY-OUTSTANDING-ORDERS
                         END-READ
                    END-PERFORM
                    PERFORM UNTIL MORE-MAILING-LABELS = "NO "
                         READ SJP-MAILING-LIST
                              AT END MOVE "NO " TO MORE-MAILING-LABELS
                              NOT AT END
                                  PERFORM 120-DAILY-MAILING-LABELS
                         END-READ
                    END-PERFORM
                    PERFORM 130-RESET-PO-NUMBER
                    MOVE THE-CURRENT-DATE TO LAST-DATE-RUN
                    REWRITE LAST-DATE
                END-IF
           CLOSE SJP-DATE
                 SJP-DAILY-OUTSTANDING-ORDERS
                 SJP-MAILING-LABELS
                 SJP-MAILING-LIST
                 SJP-OUTSTANDING-ORDERS-REPORT.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL CREATE THE DAILY OUTSTANDING      *
      *  ORDERS REPORT THAT WILL SHOW WHAT ORDERS NEED TO   *
      *  BE SHIPPED OUT THAT DAY                            *
      *                                                     *
      *******************************************************
       110-DAILY-OUTSTANDING-ORDERS.
           MOVE THE-YEAR  TO OUT-ORDERS-YEAR-OUT
           MOVE THE-MONTH TO OUT-ORDERS-MONTH-OUT
           MOVE THE-DAY   TO OUT-ORDERS-DAY-OUT
           MOVE OUT-ORDERS-PO-NUMBER     TO OUT-ORDERS-PO-NUMBER-OUT
           MOVE OUT-ORDERS-CUSTOMER-CODE TO OUT-ORDERS-CUST-CODE-OUT
           MOVE OUT-ORDERS-PRODUCT-CODE  TO OUT-ORDERS-PRODCODE-OUT
           MOVE OUT-ORDERS-QUANTITY      TO OUT-ORDERS-QUANTITY-OUT
           IF OUT-ORDERS-PO-NUMBER NOT = LAST-PO-NUMBER
                PERFORM 111-PRINT-ORDER-HEADING
           END-IF
           SET X TO 1
           SEARCH PRODUCT-TABLE
                AT END MOVE SPACES TO OUT-ORDERS-PRODDESC-OUT
                WHEN OUT-ORDERS-PRODUCT-CODE = PRODUCT-CODE(X)
                     MOVE PRODUCT-DESC(X) TO OUT-ORDERS-PRODDESC-OUT
           END-SEARCH
           WRITE OUTSTANDING-ORDERS-LINE-OUT
                      FROM OUTSTANDING-ORDERS-SUBORDER
                AFTER ADVANCING 1 LINE
           ADD 1 TO OUT-ORDERS-LINE-COUNT.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL PRINT THE HEADINGS FOR EACH NEW   *
      *  ORDER FOR THE DAILY OUTSTANDING ORDERS             *
      *                                                     *
      *******************************************************
       111-PRINT-ORDER-HEADING.
           MOVE SPACES TO OUTSTANDING-ORDERS-LINE-OUT
           WRITE OUTSTANDING-ORDERS-LINE-OUT
                AFTER ADVANCING 1 LINE
           ADD 1 TO OUT-ORDERS-LINE-COUNT
           IF OUT-ORDERS-LINE-COUNT > 60
                PERFORM 115-PRINT-OUT-ORDERS-HEADINGS
           END-IF
           WRITE OUTSTANDING-ORDERS-LINE-OUT
                      FROM OUTSTANDING-ORDERS-ORDER
           MOVE OUT-ORDERS-PO-NUMBER TO LAST-PO-NUMBER.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL PRINT THE HEADINGS FOR THE        *
      *  DAILY MAILING LABELS                               *
      *                                                     *
      *******************************************************
       115-PRINT-OUT-ORDERS-HEADINGS.
           ADD   1      TO   OUT-ORDERS-PAGE-NUMBER
           MOVE  ZEROS  TO   OUT-ORDERS-LINE-COUNT
           WRITE OUTSTANDING-ORDERS-LINE-OUT
                        FROM OUTSTANDING-ORDERS-HEADING
                 AFTER ADVANCING PAGE
           MOVE  SPACES TO   OUTSTANDING-ORDERS-LINE-OUT
           WRITE OUTSTANDING-ORDERS-LINE-OUT
                 AFTER ADVANCING 1 LINE.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL CREATE THE DAILY MAILING LABELS   *
      *  FOR ALL THE OUTSTANDING ORDERS THAT NEED TO BE     *
      *  SHIPPED OUT THAT DAY                               *
      *                                                     *
      *******************************************************
       120-DAILY-MAILING-LABELS.
           MOVE THE-YEAR  TO MAILING-YEAR-OUT
           MOVE THE-MONTH TO MAILING-MONTH-OUT
           MOVE THE-DAY   TO MAILING-DAY-OUT
           MOVE MAIL-LIST-CUSTOMER-NAME TO MAILING-CUSTOMER-NAME-OUT
           MOVE MAIL-LIST-CUSTOMER-CODE TO MAILING-CUSTOMER-CODE-OUT
           MOVE MAIL-LIST-STREET        TO MAILING-STREET-OUT
           MOVE MAIL-LIST-CITY          TO MAILING-CITY-OUT
           MOVE MAIL-LIST-STATE         TO MAILING-STATE-OUT
           MOVE MAIL-LIST-ZIPCODE       TO MAILING-ZIPCODE-OUT
           IF MAILING-LINE-COUNT > 60
               PERFORM 125-PRINT-MAILING-HEADINGS
           END-IF
           WRITE MAILING-LABELS-LINE-OUT FROM MAILING-LABELS-RECORD-1
                 AFTER ADVANCING 1 LINE
           WRITE MAILING-LABELS-LINE-OUT FROM MAILING-LABELS-RECORD-2
                 AFTER ADVANCING 1 LINE
           WRITE MAILING-LABELS-LINE-OUT FROM MAILING-LABELS-RECORD-3
                 AFTER ADVANCING 1 LINE
           MOVE SPACES TO MAILING-LABELS-LINE-OUT
           WRITE MAILING-LABELS-LINE-OUT
                 AFTER ADVANCING 1 LINE
           ADD 4 TO MAILING-LINE-COUNT.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL PRINT THE HEADINGS FOR THE        *
      *  DAILY MAILING LABELS                               *
      *                                                     *
      *******************************************************
       125-PRINT-MAILING-HEADINGS.
           ADD   1      TO MAILING-PAGE-NUMBER
           MOVE  ZEROS  TO MAILING-LINE-COUNT
           WRITE MAILING-LABELS-LINE-OUT FROM MAILING-LABELS-HEADING
                 AFTER ADVANCING PAGE
           MOVE  SPACES TO MAILING-LABELS-LINE-OUT
           WRITE MAILING-LABELS-LINE-OUT
                 AFTER ADVANCING 1 LINE.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL RESET THE 4 DIGIT PO NUMBER       *
      *  THAT WILL BE COMBINED WITH THE DATE TO PRODUCE     *
      *  A UNIQUE 10 DIGIT PO NUMBER IN THE FORM YYMMDDPONO *
      *                                                     *
      *******************************************************
       130-RESET-PO-NUMBER.
           OPEN I-O SJP-NEXT-PO-NUMBER
           READ SJP-NEXT-PO-NUMBER
                AT END MOVE "NO " TO ANOTHER-NUMBER
           END-READ
           MOVE THE-CURRENT-DATE TO NEXT-PO-NUMBER-DATE
           MOVE ZEROS TO NEXT-PO-NUMBER-NUMBER
           REWRITE NEXT-PO-NUMBER
           CLOSE SJP-NEXT-PO-NUMBER.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL CREATE THE PRODUCT TABLE FOR      *
      *  RAPID ACCESS WITHIN THE PROGRAM                    *
      *                                                     *
      *******************************************************
       140-CREATE-PRODUCT-TABLE.
           OPEN INPUT SJP-PRODUCT-TABLE
           SET X TO 1
           PERFORM UNTIL X > 24
               READ SJP-PRODUCT-TABLE INTO PRODUCT-TABLE(X)
                    AT END MOVE "NO " TO MORE-PRODUCTS
               END-READ
               SET X UP BY 1
           END-PERFORM
           CLOSE SJP-PRODUCT-TABLE.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL PRINT THE MAIN MENU ON THE SCREEN *
      *                                                     *
      *******************************************************
       200-PRINT-MENU.
           DISPLAY SCREEN-1
           ACCEPT  SCREEN-1.
The linkage section comes before the screen section, and it is used to define data that is passed to this program. You don't need it for your program - I was just checking to see your SECTIONS were ordered correctly.

Last edited by blacky_5251; 04-19-2008 at 12:58 AM.
 
Old 04-19-2008, 10:53 AM   #7
JMJ_coder
Member
 
Registered: Apr 2006
Distribution: Fedora
Posts: 478

Original Poster
Rep: Reputation: 30
Hello,

Quote:
Originally Posted by blacky_5251 View Post
Can you repost your source please? This is the source that I was able to compile without any errors:-
Here is the code:
Code:
       IDENTIFICATION DIVISION.
       PROGRAM-ID. SJPINFOSYS.
      ***************************************************
      *                                                 *
      *  CIS 3741 FINAL PROJECT                         *
      *                                                 *
      *  CREATED APRIL 4, 2008                          *
      *                                                 *
      ***************************************************
       ENVIRONMENT DIVISION.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT SJP-CUSTOMER-INFORMATION-FILE
               ASSIGN TO DISK-SJPCUSTINF.
           SELECT SJP-DATE
               ASSIGN TO DISK-SJPDATE.
           SELECT SJP-MAILING-LIST
               ASSIGN TO DISK-SJPMAILING.
           SELECT SJP-NEXT-CUSTOMER-CODE
               ASSIGN TO DISK-SJPNEXTCUS.
           SELECT SJP-NEXT-PO-NUMBER
               ASSIGN TO DISK-SJPNEXTPO.
           SELECT SJP-PURCHASING-ORDERS
               ASSIGN TO DISK-SJPORDERS.
           SELECT SJP-ORDER-INFORMATION
               ASSIGN TO DISK-SJPORDINF.
           SELECT SJP-DAILY-OUTSTANDING-ORDERS
               ASSIGN TO DISK-SJPOUTORD.
           SELECT SJP-PRODUCT-TABLE
               ASSIGN TO DISK-SJPPRODUCT.
           SELECT SJP-MAILING-LABELS
               ASSIGN TO PRINTER-QPRINT.
           SELECT SJP-OUTSTANDING-ORDERS-REPORT
               ASSIGN TO PRINTER-QPRINT.
           SELECT SJP-ORDER-FORM
               ASSIGN TO PRINTER-QPRINT.
      ***************************************************
      *                                                 *
      *  THIS DIVISION WILL DEFINE ALL STORAGE BEING    *
      *  READ IN BY THE FILES, BEING OUTPUTED TO FILES  *
      *  AND BEING USED BY THE PROGRAM                  *
      *                                                 *
      ***************************************************
       DATA DIVISION.
       FILE SECTION.
       FD  SJP-CUSTOMER-INFORMATION-FILE.
       01  CUSTOMER-RECORD-IN.
           05  CUSTOMER-CODE             PIC 9(5).
           05  CUSTOMER-NAME             PIC X(40).
           05  STREET                    PIC X(40).
           05  CITY                      PIC X(20).
           05  STATE                     PIC X(4).
           05  ZIPCODE                   PIC X(5).
           05  TELEPHONE-NUMBER          PIC X(10).
           05  EMAIL-ADDRESS             PIC X(60).
       FD  SJP-DATE.   
       01  LAST-DATE.
           05  LAST-DATE-RUN             PIC 9(6).
       FD  SJP-MAILING-LIST.
       01  MAILING-LIST-IN.
           05  MAIL-LIST-CUSTOMER-CODE   PIC 9(5).
           05  MAIL-LIST-CUSTOMER-NAME   PIC X(40).
           05  MAIL-LIST-STREET          PIC X(40).
           05  MAIL-LIST-CITY            PIC X(20).
           05  MAIL-LIST-STATE           PIC X(4).
           05  MAIL-LIST-ZIPCODE         PIC X(5).
           05  MAIL-LIST-SHIPPED         PIC X.
       FD  SJP-NEXT-CUSTOMER-CODE. 
       01  NEXT-CUSTOMER-CODE.
           05  NEXT-CUSTOMER-CODE-NUMBER PIC 9(5).
       FD  SJP-NEXT-PO-NUMBER.
       01  NEXT-PO-NUMBER.
           05  NEXT-PO-NUMBER-DATE       PIC 9(6).
           05  NEXT-PO-NUMBER-NUMBER     PIC 9(4).
       FD  SJP-PURCHASING-ORDERS.
       01  PURCHASING-ORDERS.
           05  ORDERS-PO-NUMBER          PIC 9(10).
           05  ORDERS-CUSTOMER-CODE      PIC 9(5).
           05  ORDERS-ORDER-DATE         PIC 9(6).
           05  ORDERS-HAS-SHIPPED        PIC X.
           05  ORDERS-SHIPPING-DATE      PIC 9(6).
           05  ORDERS-TOTAL-ORDER-PRICE  PIC 999999V99.
       FD  SJP-ORDER-INFORMATION.
       01  ORDER-INFORMATION.
           05  ORDER-INFO-PO-NUMBER      PIC 9(10).
           05  ORDER-INFO-PRODUCT-CODE   PIC X(5).
           05  ORDER-INFO-QUANTITY       PIC 9(4).
           05  ORDER-INFO-PRODUCT-PRICE  PIC 999999V99.
       FD  SJP-DAILY-OUTSTANDING-ORDERS.
       01  DAILY-OUTSTANDING-ORDERS.
           05  OUT-ORDERS-PO-NUMBER      PIC 9(10).
           05  OUT-ORDERS-CUSTOMER-CODE  PIC 9(5).
           05  OUT-ORDERS-PRODUCT-CODE   PIC X(5).
           05  OUT-ORDERS-QUANTITY       PIC 9(4).
           05  OUT-ORDERS-HAS-SHIPPED    PIC X.
       FD  SJP-PRODUCT-TABLE.
       01  SJP-PRODUCTS                  PIC X(70).
       FD  SJP-MAILING-LABELS.
       01  MAILING-LABELS-LINE-OUT       PIC X(70).
       FD  SJP-OUTSTANDING-ORDERS-REPORT.
       01  OUTSTANDING-ORDERS-LINE-OUT   PIC X(100).
       FD  SJP-ORDER-FORM.
       01  ORDER-FORM-LINE-OUT           PIC X(100).
      ***************************************************
      *                                                 *
      *  ALL VARIABLES THAT ARE READ IN FROM OR         *
      *  WRITTEN TO A FILE WILL BE DECLARED IN THIS     *
      *  WORKING-STORAGE SECTION                        *
      *                                                 *
      ***************************************************
       WORKING-STORAGE SECTION.
       01  WORK-AREA.
           05  ANOTHER-DATE              PIC XXX         VALUE "YES".
           05  ANOTHER-NUMBER            PIC XXX         VALUE "YES".
           05  MORE-PRODUCTS             PIC XXX         VALUE "YES".
           05  MORE-OUTSTANDING-ORDERS   PIC XXX         VALUE "YES".
           05  MORE-MAILING-LABELS       PIC XXX         VALUE "YES".
           05  MAILING-LINE-COUNT        PIC 99          VALUE 99.
           05  OUT-ORDERS-LINE-COUNT     PIC 99          VALUE 90.
           05  LAST-PO-NUMBER            PIC 9(10)       VALUE ZEROS.
       01  THE-CURRENT-DATE.
           05  THE-YEAR                  PIC 99.
           05  THE-MONTH                 PIC 99.
           05  THE-DAY                   PIC 99.
       01  TABLE1.
           05  PRODUCT-TABLE OCCURS 24 TIMES INDEXED BY X.
               10  PRODUCT-CODE          PIC X(5).
               10  PRODUCT-DESC          PIC X(60).
               10  PRODUCT-UNITPRICE     PIC 999V99.
       01  MAILING-LABELS-HEADING. 
           05  MAILING-MONTH-OUT         PIC 99.
           05                            PIC X           VALUE "/".
           05  MAILING-DAY-OUT           PIC 99.
           05                            PIC X           VALUE "/".
           05  MAILING-YEAR-OUT          PIC 99. 
           05                            PIC X(15)       VALUE SPACES.
           05                            PIC X(20)       VALUE
               "DAILY MAILING LABELS".
           05                            PIC X(15)       VALUE SPACES.
           05                            PIC X(5)        VALUE "PAGE ".
           05  MAILING-PAGE-NUMBER       PIC 999         VALUE ZEROS.
       01  OUTSTANDING-ORDERS-HEADING.
           05  OUT-ORDERS-MONTH-OUT      PIC 99.
           05                            PIC X           VALUE "/".
           05  OUT-ORDERS-DAY-OUT        PIC 99.
           05                            PIC X           VALUE "/".
           05  OUT-ORDERS-YEAR-OUT       PIC 99. 
           05                            PIC X(15)       VALUE SPACES.
           05                            PIC X(24)       VALUE
               "DAILY OUTSTANDING ORDERS".
           05                            PIC X(15)       VALUE SPACES.
           05                            PIC X(5)        VALUE "PAGE ".
           05  OUT-ORDERS-PAGE-NUMBER    PIC 999         VALUE ZEROS.
       01  OUTSTANDING-ORDERS-ORDER.
           05                            PIC X(13)       VALUE
               "P.O. NUMBER: ".
           05  OUT-ORDERS-PO-NUMBER-OUT  PIC 9(10).
           05                            PIC X(20)       VALUE 
               "     CUSTOMER CODE: ".
           05  OUT-ORDERS-CUST-CODE-OUT  PIC 9(5).
       01  OUTSTANDING-ORDERS-SUBORDER.
           05                            PIC X(5)       VALUE SPACES.
           05  OUT-ORDERS-PRODCODE-OUT   PIC X(5).
           05                            PIC X(3)       VALUE
               " - ".
           05  OUT-ORDERS-PRODDESC-OUT   PIC X(60).
           05  OUT-ORDERS-QUANTITY-OUT   PIC 9(4).
       01  MAILING-LABELS-RECORD-1.
           05  MAILING-CUSTOMER-NAME-OUT PIC X(40).
           05                            PIC X(10)       VALUE SPACES.
           05  MAILING-CUSTOMER-CODE-OUT PIC 9(5).
       01  MAILING-LABELS-RECORD-2.
           05  MAILING-STREET-OUT        PIC X(40).
       01  MAILING-LABELS-RECORD-3.
           05  MAILING-CITY-OUT          PIC X(20).
           05                            PIC XX          VALUE ", ".
           05  MAILING-STATE-OUT         PIC X(2).
           05                            PIC X           VALUE SPACES.
           05  MAILING-ZIPCODE-OUT       PIC X(5).
       01  USER-KEYED-IN-DATA.
           05  MENU-CHOICE               PIC X.
      ***************************************************
      *                                                 *
      *  THIS SECTION WILL DEFINE THE VARIOUS SCREENS   *
      *  USED FOR INTERACTIVE PROCESSING IN THE PROGRAM *
      *                                                 *
      ***************************************************
       SCREEN SECTION.
       01  SCREEN-1.
           05  BLANK SCREEN
               FOREGROUND-COLOR 13
               BACKGROUND-COLOR 2.
           05  LINE  1 COLUMN 6 VALUE "********** MAIN MENU **********".
           05  LINE  4 COLUMN 6 VALUE "1: ENTER A NEW CUSTOMER ACCOUNT".
           05  LINE  6 COLUMN 6 VALUE "2: PLACE A NEW PURCHASING ORDER".
           05  LINE  8 COLUMN 6 VALUE "3: UPDATE SHIPPING STATUS".
           05  LINE 10 COLUMN 6 VALUE "4: GET CUSTOMER ORDER HISTORY".
           05  LINE 14 COLUMN 6 VALUE "0: EXIT PROGRAM".
           05  LINE 20 COLUMN 6 VALUE "ENTER SELECTION: ".
           05  COLUMN 24 PIC X TO MENU-CHOICE.
      ***************************************************
      *                                                 *
      *  THIS DIVISION WILL DO ALL THE COMPUTATIONS     *
      *  AND PROCESS ALL THE DATA FOR THE PROGRAM       *
      *                                                 *
      ***************************************************
       PROCEDURE DIVISION.
      ***************************************************
      *                                                 *
      *  THIS MODULE WILL BE THE MAIN PROGRAM           *
      *  IT WILL CALL FOR ALL OTHER MAJOR MODULES       *
      *                                                 *
      ***************************************************
       000-MAIN-MODULE.
           PERFORM 100-INITIALIZE
           PERFORM 200-PRINT-MENU
           STOP RUN.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL INITIALIZE THE FILES TO BE USED   *
      *  FOR THE BATCH PROCESSING ON EVERY MORNING AND      *
      *  SET THE VARIABLE FOR THE DATE, ANALYZE IF IT IS A  *
      *  NEW DATE, AND IF IT IS PROCESS THE BATCH OPERATIONS*
      *  TO CREATE A DAILY OUTSTANDING ORDERS FORM, DAILY   *
      *  MAILING LABELS, RESET THE PONUMBERS, AND PUT THE   *
      *  PRODUCT FILE INTO A TABLE                          *
      *                                                     *
      *******************************************************
       100-INITIALIZE.
           OPEN INPUT  SJP-MAILING-LIST
                       SJP-DAILY-OUTSTANDING-ORDERS
                I-O    SJP-DATE
                OUTPUT SJP-MAILING-LABELS
                       SJP-OUTSTANDING-ORDERS-REPORT
           PERFORM 140-CREATE-PRODUCT-TABLE
           ACCEPT THE-CURRENT-DATE FROM DATE
           READ SJP-DATE
                AT END MOVE "NO " TO ANOTHER-DATE
           END-READ
                IF LAST-DATE-RUN < THE-CURRENT-DATE
                    PERFORM UNTIL MORE-OUTSTANDING-ORDERS = "NO "
                         READ SJP-DAILY-OUTSTANDING-ORDERS
                              AT END MOVE "NO " 
                                  TO MORE-OUTSTANDING-ORDERS
                              NOT AT END 
                                  PERFORM 110-DAILY-OUTSTANDING-ORDERS
                         END-READ
                    END-PERFORM
                    PERFORM UNTIL MORE-MAILING-LABELS = "NO "
                         READ SJP-MAILING-LIST
                              AT END MOVE "NO " TO MORE-MAILING-LABELS
                              NOT AT END 
                                  PERFORM 120-DAILY-MAILING-LABELS
                         END-READ
                    END-PERFORM
                    PERFORM 130-RESET-PO-NUMBER
                    MOVE THE-CURRENT-DATE TO LAST-DATE-RUN
                    REWRITE LAST-DATE
                END-IF
           CLOSE SJP-DATE
                 SJP-DAILY-OUTSTANDING-ORDERS
                 SJP-MAILING-LABELS
                 SJP-MAILING-LIST
                 SJP-OUTSTANDING-ORDERS-REPORT.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL CREATE THE DAILY OUTSTANDING      *
      *  ORDERS REPORT THAT WILL SHOW WHAT ORDERS NEED TO   *
      *  BE SHIPPED OUT THAT DAY                            *
      *                                                     *
      *******************************************************
       110-DAILY-OUTSTANDING-ORDERS.
           MOVE THE-YEAR  TO OUT-ORDERS-YEAR-OUT
           MOVE THE-MONTH TO OUT-ORDERS-MONTH-OUT
           MOVE THE-DAY   TO OUT-ORDERS-DAY-OUT
           MOVE OUT-ORDERS-PO-NUMBER     TO OUT-ORDERS-PO-NUMBER-OUT
           MOVE OUT-ORDERS-CUSTOMER-CODE TO OUT-ORDERS-CUST-CODE-OUT
           MOVE OUT-ORDERS-PRODUCT-CODE  TO OUT-ORDERS-PRODCODE-OUT
           MOVE OUT-ORDERS-QUANTITY      TO OUT-ORDERS-QUANTITY-OUT
           IF OUT-ORDERS-PO-NUMBER NOT = LAST-PO-NUMBER
                PERFORM 111-PRINT-ORDER-HEADING
           END-IF
           SET X TO 1
           SEARCH PRODUCT-TABLE
                AT END MOVE SPACES TO OUT-ORDERS-PRODDESC-OUT
                WHEN OUT-ORDERS-PRODUCT-CODE = PRODUCT-CODE(X)
                     MOVE PRODUCT-DESC(X) TO OUT-ORDERS-PRODDESC-OUT
           END-SEARCH
           WRITE OUTSTANDING-ORDERS-LINE-OUT 
                      FROM OUTSTANDING-ORDERS-SUBORDER
                AFTER ADVANCING 1 LINE
           ADD 1 TO OUT-ORDERS-LINE-COUNT.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL PRINT THE HEADINGS FOR EACH NEW   *
      *  ORDER FOR THE DAILY OUTSTANDING ORDERS             *
      *                                                     *
      *******************************************************
       111-PRINT-ORDER-HEADING.
           MOVE SPACES TO OUTSTANDING-ORDERS-LINE-OUT 
           WRITE OUTSTANDING-ORDERS-LINE-OUT
                AFTER ADVANCING 1 LINE
           ADD 1 TO OUT-ORDERS-LINE-COUNT
           IF OUT-ORDERS-LINE-COUNT > 60
                PERFORM 115-PRINT-OUT-ORDERS-HEADINGS
           END-IF
           WRITE OUTSTANDING-ORDERS-LINE-OUT 
                      FROM OUTSTANDING-ORDERS-ORDER
           MOVE OUT-ORDERS-PO-NUMBER TO LAST-PO-NUMBER.            
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL PRINT THE HEADINGS FOR THE        *
      *  DAILY MAILING LABELS                               *
      *                                                     *
      *******************************************************
       115-PRINT-OUT-ORDERS-HEADINGS.
           ADD   1      TO   OUT-ORDERS-PAGE-NUMBER
           MOVE  ZEROS  TO   OUT-ORDERS-LINE-COUNT
           WRITE OUTSTANDING-ORDERS-LINE-OUT 
                        FROM OUTSTANDING-ORDERS-HEADING
                 AFTER ADVANCING PAGE
           MOVE  SPACES TO   OUTSTANDING-ORDERS-LINE-OUT
           WRITE OUTSTANDING-ORDERS-LINE-OUT
                 AFTER ADVANCING 1 LINE.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL CREATE THE DAILY MAILING LABELS   *
      *  FOR ALL THE OUTSTANDING ORDERS THAT NEED TO BE     *
      *  SHIPPED OUT THAT DAY                               *
      *                                                     *
      *******************************************************
       120-DAILY-MAILING-LABELS.
           MOVE THE-YEAR  TO MAILING-YEAR-OUT
           MOVE THE-MONTH TO MAILING-MONTH-OUT
           MOVE THE-DAY   TO MAILING-DAY-OUT
           MOVE MAIL-LIST-CUSTOMER-NAME TO MAILING-CUSTOMER-NAME-OUT
           MOVE MAIL-LIST-CUSTOMER-CODE TO MAILING-CUSTOMER-CODE-OUT
           MOVE MAIL-LIST-STREET        TO MAILING-STREET-OUT
           MOVE MAIL-LIST-CITY          TO MAILING-CITY-OUT
           MOVE MAIL-LIST-STATE         TO MAILING-STATE-OUT
           MOVE MAIL-LIST-ZIPCODE       TO MAILING-ZIPCODE-OUT
           IF MAILING-LINE-COUNT > 60
               PERFORM 125-PRINT-MAILING-HEADINGS
           END-IF
           WRITE MAILING-LABELS-LINE-OUT FROM MAILING-LABELS-RECORD-1 
                 AFTER ADVANCING 1 LINE
           WRITE MAILING-LABELS-LINE-OUT FROM MAILING-LABELS-RECORD-2 
                 AFTER ADVANCING 1 LINE
           WRITE MAILING-LABELS-LINE-OUT FROM MAILING-LABELS-RECORD-3 
                 AFTER ADVANCING 1 LINE
           MOVE SPACES TO MAILING-LABELS-LINE-OUT
           WRITE MAILING-LABELS-LINE-OUT
                 AFTER ADVANCING 1 LINE
           ADD 4 TO MAILING-LINE-COUNT.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL PRINT THE HEADINGS FOR THE        *
      *  DAILY MAILING LABELS                               *
      *                                                     *
      *******************************************************
       125-PRINT-MAILING-HEADINGS.
           ADD   1      TO MAILING-PAGE-NUMBER
           MOVE  ZEROS  TO MAILING-LINE-COUNT
           WRITE MAILING-LABELS-LINE-OUT FROM MAILING-LABELS-HEADING
                 AFTER ADVANCING PAGE
           MOVE  SPACES TO MAILING-LABELS-LINE-OUT
           WRITE MAILING-LABELS-LINE-OUT
                 AFTER ADVANCING 1 LINE.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL RESET THE 4 DIGIT PO NUMBER       *
      *  THAT WILL BE COMBINED WITH THE DATE TO PRODUCE     *
      *  A UNIQUE 10 DIGIT PO NUMBER IN THE FORM YYMMDDPONO *
      *                                                     *
      *******************************************************
       130-RESET-PO-NUMBER.
           OPEN I-O SJP-NEXT-PO-NUMBER
           READ SJP-NEXT-PO-NUMBER
                AT END MOVE "NO " TO ANOTHER-NUMBER
           END-READ
           MOVE THE-CURRENT-DATE TO NEXT-PO-NUMBER-DATE
           MOVE ZEROS TO NEXT-PO-NUMBER-NUMBER
           REWRITE NEXT-PO-NUMBER
           CLOSE SJP-NEXT-PO-NUMBER.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL CREATE THE PRODUCT TABLE FOR      *
      *  RAPID ACCESS WITHIN THE PROGRAM                    *
      *                                                     *
      *******************************************************
       140-CREATE-PRODUCT-TABLE.
           OPEN INPUT SJP-PRODUCT-TABLE
           SET X TO 1
           PERFORM UNTIL X > 24
               READ SJP-PRODUCT-TABLE INTO PRODUCT-TABLE(X)
                    AT END MOVE "NO " TO MORE-PRODUCTS
               END-READ
               SET X UP BY 1
           END-PERFORM
           CLOSE SJP-PRODUCT-TABLE.
      *******************************************************
      *                                                     *
      *  THIS MODULE WILL PRINT THE MAIN MENU ON THE SCREEN *
      *                                                     *
      *******************************************************
       200-PRINT-MENU.
           DISPLAY SCREEN-1
           ACCEPT  SCREEN-1.
All that I changed was the SCREEN SECTION - here:
Code:
   ***************************************************
      *                                                 *
      *  THIS SECTION WILL DEFINE THE VARIOUS SCREENS   *
      *  USED FOR INTERACTIVE PROCESSING IN THE PROGRAM *
      *                                                 *
      ***************************************************
       SCREEN SECTION.
       01  SCREEN-1.
           05  BLANK SCREEN
               FOREGROUND-COLOR 13
               BACKGROUND-COLOR 2.
           05  LINE  1 COLUMN 6 VALUE "********** MAIN MENU **********".
           05  LINE  4 COLUMN 6 VALUE "1: ENTER A NEW CUSTOMER ACCOUNT".
           05  LINE  6 COLUMN 6 VALUE "2: PLACE A NEW PURCHASING ORDER".
           05  LINE  8 COLUMN 6 VALUE "3: UPDATE SHIPPING STATUS".
           05  LINE 10 COLUMN 6 VALUE "4: GET CUSTOMER ORDER HISTORY".
           05  LINE 14 COLUMN 6 VALUE "0: EXIT PROGRAM".
           05  LINE 20 COLUMN 6 VALUE "ENTER SELECTION: ".
           05  COLUMN 24 PIC X TO MENU-CHOICE.

From the spool file - the compiler is IBM COBOL/400.

Here is the first few error messages:
Code:
* 161 MSGID: LBL1030 SEVERITY: 30 SEQNBR: 019200 
      Message . . . . : 'SCREEN' invalid. Restarting at next Area A reserved word or start of clause. 
* 161 MSGID: LBL0018 SEVERITY: 00 SEQNBR: 019200
      Message . . . . : Input ignored starting with 'SCREEN'.
* 162 MSGID: LBL0013 SEVERITY: 00 SEQNBR: 019300
      Message . . . . : Compilation continued starting with '01'.
* 163 MSGID: LBL1099 SEVERITY: 30 SEQNBR: 019400
      Message . . . . : ZERO expected; found 'SCREEN'. BLANK WHEN ZERO assumed.
* 163 MSGID: LBL0018 SEVERITY: 00 SEQNBR: 019400
      Message . . . . : Input ignored starting with 'SCREEN'.
* 163 MSGID: LBL0239 SEVERITY: 20 SEQNBR: 019400
      Message . . . . : BLANK WHEN ZERO clause cannot be specified for group item 'FILLER'. BLANK WHEN ZERO clause ignored.
* 164 MSGID: LBL0013 SEVERITY: 00 SEQNBR: 019500
      Message . . . . : Compilation continued starting with '13'.
* 165 MSGID: LBL0499 SEVERITY: 20 SEQNBR: 019600
      Message . . . . : Period required. Period assumed after 'BACKGROUND-COLOR'.
* 165 MSGID: LBL1236 SEVERITY: 30 SEQNBR: 019600
      Message . . . . : No PICTURE for elementary item 'BACKGROUND-COLOR'. PICTURE X(2) assumed.
* 165 MSGID: LBL1236 SEVERITY: 30 SEQNBR: 019600
      Message . . . . : No PICTURE for elementary item 'FILLER'. PICTURE X(2) assumed.
* 166 MSGID: LBL1203 SEVERITY: 30 SEQNBR: 019700
      Message . . . . : Expected date-name/FILLER after level-number; found 'LINE'. Data description entry ignored.
In all there are 81 errors - of which 27 are severe. To note, there are 0 errors when I omit the SCREEN SECTION.





Quote:
Originally Posted by blacky_5251 View Post
The linkage section comes before the screen section, and it is used to define data that is passed to this program. You don't need it for your program - I was just checking to see your SECTIONS were ordered correctly.
Oh, okay. We haven't been taught about the LINKAGE SECTION. In fact, we haven't even been taught about the SCREEN SECTION. Ironic, our final project is supposed to incorporate interactivity, but we haven't been instructed on how to do that - I am trying to learn on my own.
 
Old 04-19-2008, 04:46 PM   #8
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 4&5, Fedora 10, CentOS 5.4, IPCop
Posts: 569

Rep: Reputation: 55
Well your code compiles OK for me, which suggests your compiler is so old that it doesn't support SCREEN SECTIONS.

I think you're going to have to resort to many display and accept statements - as you tried originally.
 
Old 04-20-2008, 03:24 PM   #9
JMJ_coder
Member
 
Registered: Apr 2006
Distribution: Fedora
Posts: 478

Original Poster
Rep: Reputation: 30
Hello,

That is not cool!

Thank you for all your help.
 
Old 04-21-2008, 01:44 AM   #10
ronlau9
Senior Member
 
Registered: Dec 2007
Location: In front of my LINUX OR MAC BOX
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369

Rep: Reputation: Disabled
I am retire now for let say 10 year but as Cobol was my field I was wondering about the fact that Environment Devision is just empty in the past there where at least two lines in it the Source computer and the Object computer knowing Cobol it begin to act strange when you leave some think out ,but may be it do not apply anymore
I am pretty sure and in the old days we do Have Screen section.
The AS400 with his OS400 was one of those computers ,but of most of my work was don VAX Cobol

all the best
 
Old 04-21-2008, 02:27 AM   #11
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 4&5, Fedora 10, CentOS 5.4, IPCop
Posts: 569

Rep: Reputation: 55
I don't know about other flavours of COBOL, but the SOURCE and OBJECT statements have become redundant in ACUCOBOL from Acucorp. With ACUCOBOL, you can compile on any machine and run on any machine - it was 10 years ahead of Java with the "write once, run anywhere" concept.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
screen resolution and monitor section davimint Slackware 4 02-16-2008 02:14 PM
xorg.conf bizarre monitor section / obtaining 96dpi screen resolution for WinXP Font lesmyer Linux - Newbie 1 06-13-2006 01:30 PM
Section 6.15 Coreutils compile error microsoft/linux Linux From Scratch 7 09-04-2005 07:48 PM
Section 6.14 Gcc-3.4.1 error microsoft/linux Linux From Scratch 10 08-11-2005 09:52 PM
differences+between+mainframe+cobol+and+AIX+cobol+data+type ssrividhya AIX 1 08-09-2004 09:13 AM


All times are GMT -5. The time now is 12:19 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration