title: Nested perform needs and doesn't need an end-perform
body: <p>With this code, I get </p>
  
  <pre><code>16: Perform stmnt not terminated by end-perform
  
  33: syntax error, unexpected end-perform
  </code></pre>
  
  <p>Why is it saying that I need an end-perform and also not need it?</p>
  
  <pre><code>   identification division.
     program-id.  xxx.     
    * will accept and display a num until 0 is called then
    * asks to go again
  
  
     data division.
     file section.
  
     working-storage section.     
     01  num                 pic 9(4).
     01  hold                pic 9(4).
     01  another             pic x.
     procedure division.
       perform until another = 'N'                 (line 16)
          Display "Another Session (Y/N)? "
                with no advancing
          if another = 'Y'
          Display "Enter a 4-digit unsigned number (0 to stop): "
               with no advancing
          accept num
          move num to hold
          perform until num = 0
          Display "Enter a 4-digit unsigned number (0 to stop): "
               with no advancing
          accept num
            if num &lt;&gt; 0
         move num to hold
          end-perform.
          display space
          Display "The last number entered: "hold
       End-perform.                            (Line 33)
  
       stop run.
  </code></pre>