× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Greetings again,

I have been working on RECORD CONTAINS error problem for over 2 hours now. I 
cannot seem to figure out what I am doing wrong. The physical file has a record 
format of 42. Do I have to make this number higher? I have tried all the way up 
to 76 or more.

The file listings below are:

Physical File Listing
Source Code
Section of Codes where errors are located by compiler
Error listings

I believe my problem stems from either the physical file or I am somehow not 
referencing or leaving out something important. Fi you could point me in the 
right direction of my errors, i would be greatful. But please do not just give 
out the code, I guess a hint would be a better way of putting it.


 Columns . . . :    1  71            Edit                       TUBBS/QCBLLESRC
 SEU==>                                                              CUSTTRANPF
 FMT A* .....A*. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7
        *************** Beginning of data *************************************
0001.00       ***********************************************************
0002.00       *              Customer Transaction File                  *
0003.00       *             Physical File -- CUSTTRANPF                 *
0004.00       *                  Arrival Sequence                       *
0005.00       ***********************************************************
0006.00
0007.00      A          R CUSTTRANR                 TEXT('Customer Transaction 
Report')
0008.00      A            FIRSTNAME     10A         ALIAS(CT_FIRST_NAME)
0009.00      A            MIDDLEINIT     1A         ALIAS(CT_MIDDLE_INITIAL)
0010.00      A            LASTNAME      15A         ALIAS(CT_LAST_NAME)
0011.00      A            TRANSMONTH     9A         ALIAS(CT_TRANSACTION_MONTH)
0012.00      A            TRANSAMNT      7S 2       ALIAS(CT_TRANSACTION_AMOUNT)
        ****************** End of data ****************************************


 Columns . . . :    1  71            Edit                       TUBBS/QCBLLESRC
 SEU==>                                                                CHPT0301
 FMT CB ......-A+++B+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        *************** Beginning of data *************************************
0001.00        PROCESS APOST.
0002.00
0003.00        IDENTIFICATION DIVISION.
0004.00
0005.00        PROGRAM-ID. CHPT0301.
0006.00
0007.00       ************************************************************
0008.00       *                                                          *
0009.00       *  This program reads the Customer Transaction File and    *
0010.00       *  will print a Customer Tranactions Report containing     *
0011.00       *  the Customers Full Name and Transaction Month & Amount. *
0012.00       *                                                          *
0013.00       ************************************************************
0014.00
0015.00        ENVIRONMENT DIVISION.
0016.00
0017.00        INPUT-OUTPUT SECTION.
0018.00
0019.00        FILE-CONTROL.
0020.00             SELECT CUSTOMER-TRANSACTION-FILE
0021.00                 ASSIGN TO DISK-CUSTTRANPF.
0022.00
0023.00             SELECT CUSTOMER-TRANSACTION-REPORT
0024.00                 ASSIGN TO PRINTER-QPRINT.
0025.00
0026.00        DATA DIVISION.
0027.00
0028.00        FILE SECTION.
0029.00
0030.00        FD  CUSTOMER-TRANSACTION-FILE
0031.00                RECORD CONTAINS 42 CHARACTERS.
0032.00
0033.00        01  CUSTOMER-TRANSACTION-RECORD.
0034.00            05  CT-FIRST-NAME               PIC X(10).
0035.00            05  CT-MIDDLE-INITIAL           PIC X(01).
0036.00            05  CT-LAST-NAME                PIC X(15).
0037.00            05  CT-TRANSACTION-MONTH        PIC X(09).
0038.00            05  CT-TRANSACTION-AMOUNT       PIC 9(07)V99 PACKED-DECIMAL.
0039.00
0040.00        FD  CUSTOMER-TRANSACTION-REPORT
0041.00                RECORD CONTAINS 76 CHARACTERS.
0042.00
0043.00        01  PRINT-RECORD-OUT.
0044.00            05                              PIC X(04).
0045.00            05  DL-FIRST-NAME               PIC X(09).
0046.00            05                              PIC X(02).
0047.00            05  DL-LAST-NAME                PIC X(15).
0048.00            05                              PIC X(08).
0049.00            05  DL-TRANSACTION-MONTH        PIC X(09).
0050.00            05                              PIC X(18).
0051.00            05  DL-TRANSACTION-AMOUNT       PIC 9(07)V99 PACKED-DECIMAL.
0051.01            05                              PIC X(04).
0052.00
0053.00        WORKING-STORAGE SECTION.
0054.00
0055.00        01  WS-CONTROL-FIELDS.
0056.00            05  ARE-THERE-MORE-RECORDS      PIC X(3)    VALUE 'YES'.
0057.00
0058.00        PROCEDURE DIVISION.
0059.00
0060.00        000-MAIN-MODULE.
0061.00
0062.00            OPEN INPUT  CUSTOMER-TRANSACTION-FILE
0063.00                 OUTPUT CUSTOMER-TRANSACTION-REPORT.
0064.00
0065.00            READ CUSTOMER-TRANSACTION-FILE
0066.00                AT END
0067.00                    MOVE 'NO ' TO ARE-THERE-MORE-RECORDS
0068.00            END-READ
0069.00            PERFORM 200-PROCESS-RECORD-RTN
0070.00                UNTIL ARE-THERE-MORE-RECORDS = 'NO '.
0071.00
0072.00            CLOSE CUSTOMER-TRANSACTION-FILE
0073.00                  CUSTOMER-TRANSACTION-REPORT.
0074.00
0075.00            STOP RUN.
0076.00
0077.00        200-PROCESS-RECORD-RTN.
0078.00
0079.00            MOVE SPACES TO PRINT-RECORD-OUT.
0080.00            MOVE CT-FIRST-NAME TO DL-FIRST-NAME.
0081.00            MOVE CT-LAST-NAME TO DL-LAST-NAME.
0082.00            MOVE CT-TRANSACTION-MONTH TO DL-TRANSACTION-MONTH.
0083.00            MOVE CT-TRANSACTION-AMOUNT TO DL-TRANSACTION-AMOUNT.
0084.00            WRITE PRINT-RECORD-OUT.
0085.00            READ CUSTOMER-TRANSACTION-FILE
0086.00                AT END
0087.00                    MOVE 'NO ' TO ARE-THERE-MORE-RECORDS
0088.00            END-READ.
        ****************** End of data ****************************************


        *************** Beginning of data *************************************
0001.00                    Printer Spacing Chart Guidelines
0002.00
0003.00          1         2         3         4         5         6         7  
       8
0004.00 
12345678901234567890123456789012345678901234567890123456789012345678901234567890
0005.00     X--------X  X-------------X        X-------X                  
$ZZ,ZZ$.99
0006.00     X--------X  X-------------X        X-------X                  
$ZZ,ZZ$.99
0007.00     X--------X  X-------------X        X-------X                  
$ZZ,ZZ$.99
0008.00         I              I                  I                           I
0009.00 (CT-FIRST-NAME) (CT-LAST-NNAME) (CT-TRANSACTION-MONTH)   
(CT-TRANSACTION-AMOUNT)
0010.00
0011.00
0012.00
        ****************** End of data ****************************************


Section of Code where errors are located:

    13  003000 FD  CUSTOMER-TRANSACTION-FILE
    14  003100         RECORD CONTAINS 42 CHARACTERS.
        003200
    15  003300 01  CUSTOMER-TRANSACTION-RECORD.
    16  003400     05  CT-FIRST-NAME               PIC X(10).
    17  003500     05  CT-MIDDLE-INITIAL           PIC X(01).
    18  003600     05  CT-LAST-NAME                PIC X(15).
    19  003700     05  CT-TRANSACTION-MONTH        PIC X(09).
    20  003800     05  CT-TRANSACTION-AMOUNT       PIC 9(07)V99 PACKED-DECIMAL.
        003900
    21  004000 FD  CUSTOMER-TRANSACTION-REPORT
    22  004100         RECORD CONTAINS 76 CHARACTERS.
        004200


Error listings:

  5769CB1 V4R4M0  990521            AS/400 COBOL Messages           TUBBS/CHPT0
   STMT
 *   13  MSGID: LBL0116  SEVERITY: 20  SEQNBR:  003000
         Message . . . . :   Largest record description does not match
           RECORD CONTAINS clause for file. '40' assumed.
 *   13  MSGID: LBL0117  SEVERITY: 20  SEQNBR:  003000
         Message . . . . :   Smallest record description '40' characters.
          Does not match RECORD CONTAINS. '40' assumed.
*   13  MSGID: LBL0650  SEVERITY: 00  SEQNBR:  003000
        Message . . . . :   Blocking/Deblocking for file
          'CUSTOMER-TRANSACTION-FILE' will be performed by
          compiler-generated code.

This third error message, I know what this one means, because it was pointed 
out to me on this list.

*   21  MSGID: LBL0116  SEVERITY: 20  SEQNBR:  004000
        Message . . . . :   Largest record description does not match
          RECORD CONTAINS clause for file. '70' assumed.
*   21  MSGID: LBL0117  SEVERITY: 20  SEQNBR:  004000
        Message . . . . :   Smallest record description '70' characters.
          Does not match RECORD CONTAINS. '70' assumed.


Thanks,

Eric
--
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Get 4 DVDs for $.49 cents! plus shipping & processing. Click to join.
http://oas-central.realmedia.com/RealMedia/ads/click_lx.ads/mail.com/columbiahouse/1112745096/x09/ExactAdv/ColumbiaHouse_IO473_7.19_8.19/blank.gif/636632633232383133383736634333430



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.