title: Dot rules in nested conditional statements - COBOL
body: <p>I'm wondering if anybody can explain to me the dot ruling in nested IF statements in COBOL. Example:</p>
  
  <pre><code>*The first if statement*
   IF SUCCESSFUL-STATUS 
       PERFORM 8300-REPL-LNNTBI00 
          THRU 8300-REPL-LNNTBI00-EXIT 
  *The second if statement*
          IF SUCCESSFUL-STATUS 
              DISPLAY 'RECORD ALREADY UPDATED :' WS-INF-REC
          ELSE 
              DISPLAY 'UPDATE ERROR : ' WS-INF-REC ' / ' 
              WS-RETURN-STATUS 
   READ INFILE INTO WS-INF-REC.   
  </code></pre>
  
  <p>Which if statement does the dot placed after "WS-INF-REC" belong to? The first IF or the second IF-ELSE? I know that in most programming, it should be for the last if statement but just to make sure, is it the same for COBOL?</p>