[go: up one dir, main page]

Menu

#49 Last line before starting a new paragraph must ends with Dot "."

v1.0 (example)
pending
nobody
None
3
2016-08-02
2015-01-22
No

I was trying to parse below code koopa was failing due to it expecting last line before starting a new paragraph must ends with Dot "."
"." is optional in COBOL before start of the paragraph, so please make it optional.

Not working COBOL:

::cobolfree

       IDENTIFICATION DIVISION.                                         
       PROGRAM-ID. MYTEST01.                                            
       AUTHOR.         SAURABH.                                           
      *                                                                 
       ENVIRONMENT DIVISION.                                            
      *                                                                 
       DATA DIVISION.                                                   
      *                                                                 
       WORKING-STORAGE SECTION.                                         
       01  WS-VARIABLES.                                                
           05  WS-ABC                    PIC  S9(16) COMP.              
           05  WS-PROGRAM                PIC   X(08).                   
           05  WS-RESP                   PIC  S9(08) COMP               
                                                     VALUE ZERO.        

       LINKAGE SECTION.                                                 
       PROCEDURE DIVISION USING SPL-COMMAREA.                           
           EXEC SQL INCLUDE ABCDEFGH END-EXEC                           

       100-PROCESS. 

       100-EXIT.
       EXIT. 

Working COBOL :

::cobolfree

       IDENTIFICATION DIVISION.                                         
       PROGRAM-ID. MYTEST01.                                            
       AUTHOR.         SAURABH.                                           
      *                                                                 
       ENVIRONMENT DIVISION.                                            
      *                                                                 
       DATA DIVISION.                                                   
      *                                                                 
       WORKING-STORAGE SECTION.                                         
       01  WS-VARIABLES.                                                
           05  WS-ABC                    PIC  S9(16) COMP.              
           05  WS-PROGRAM                PIC   X(08).                   
           05  WS-RESP                   PIC  S9(08) COMP               
                                                     VALUE ZERO.        

       LINKAGE SECTION.                                                 
       PROCEDURE DIVISION USING SPL-COMMAREA.                           
           EXEC SQL INCLUDE ABCDEFGH END-EXEC                           
       .
       100-PROCESS. 

       100-EXIT.
       EXIT.                                                            

Discussion

  • KrisDS

    KrisDS - 2015-03-06

    Suman, could you mention again which version of Cobol you're using ?

    All references I have seem to indicate it as being compulsory. I even found a mention that "paragraphs are always preceded by a dot". So I'd like to understand which version of Cobol is allowing this.

    Thanks

     
  • KrisDS

    KrisDS - 2016-08-02
    • status: open --> pending
     

Log in to post a comment.