ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

LBL1463 previously defined in program, use cannot be determined.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • LBL1463 previously defined in program, use cannot be determined.

    Hi,

    Could someone please guide. Getting following error. Thank you.

    * 25 MSGID: LBL1463 SEVERITY: 30 SEQNBR: 003800 Message . . . . : 'BOOKD-RECORD' previously defined in program, use cannot be determined. Default item assumed.

    Code:
           IDENTIFICATION DIVISION.                       
           PROGRAM-ID. ADDBOOKCB.                         
    
           ENVIRONMENT DIVISION.                          
           INPUT-OUTPUT SECTION.                          
           FILE-CONTROL.                                  
               SELECT BOOK-DSP ASSIGN TO WORKSTATION-BOOKD
               ORGANIZATION IS TRANSACTION                
               ACCESS MODE IS SEQUENTIAL.                 
           DATA DIVISION.                     
           FILE SECTION.                      
           FD BOOK-DSP.                       
           01 BOOKD-RECORD.                   
              COPY DD-ALL-FORMATS OF BOOKD.   
    
           PROCEDURE DIVISION.                      
    
               OPEN I-O BOOK-DSP.                   
    
               WRITE BOOKD-RECORD FORMAT IS CRTBOOK.
    
               STOP RUN.

  • #2
    Maybe the duplicate is in the copybook. Does display file BOOKD have an alias called BOOKD_RECORD?

    I would scan the compiler listing to find all the places where BOOKD-RECORD occurs.

    Comment


    • #3
      Hi Ted,

      when compiling, the compiler adding a sub-field of the same name. I tried defining a sub-field by myself but, it still generates the new sub-field with same name. can you please help.

      Code:
      13  001500 01  BOOKD-RECORD.                                              
      14  001600     COPY DDS-ALL-FORMATS OF BOOKD.                             
      15 +000001       05  BOOKD-RECORD PIC X(165).                     <=== Compiler generated sub-field 
         +000002*    I-O FORMAT:CRTBOOK    FROM FILE BOOKD      OF LIBRARY TRAI7
         +000003*                                                               
      16 +000004       05  CRTBOOK       REDEFINES BOOKD-RECORD.                
      17 +000005           06 ISBN                  PIC X(13).                  
      18 +000006           06 BOOKNAME              PIC X(40).                  
      19 +000007           06 AUTHOR-DDS            PIC X(40).                  
      20 +000008           06 LANGUAGE              PIC X(15).                  
      21 +000009           06 PRICE                 PIC S9(5)V9(2).             
      22 +000010           06 PUBLISHER             PIC X(40).                  
      23 +000011           06 FILLER                PIC X(10).                  
         +000012*                  (Date field)

      Comment


      • #4
        Solved

        The compiler generates a sub-field with name format as "FILE_NAME-RECORD". for example my PF file name is BOOKD, so the sub-field with name "BOOKD-RECORD" was getting added, and coincidentally, I too gave same record name, that was causing the problem. I changed my record name in code to "BOOKDSP-RECORD".

        Thanks for help Ted.

        Comment

        Working...
        X