Sections vrs Thru exit

 2 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Chesca
Veteran Member
Posts: 490
Veteran Member
    Hi, I am a mainframe COBOL programmer and I am used to writing a routine " PERFORM THRU EXIT. I am having hard time understanding how routines in Section work. What's the difference when you build a routine with/without section? I am animating my program, and I'd like my program to exit paragraph 3150 and go back to where it was performed. Instead, it goes to the next line/paragraph 31.
    John Henley
    Posts: 3353
      A SECTION is a grouping of paragraphs. When you PERFORM a SECTION, each paragraph is executed until an EXIT is encountered.
      Thanks for using the LawsonGuru.com forums!
      John
      Chesca
      Veteran Member
      Posts: 490
      Veteran Member
        John, thanks a lot for the explanation. I modifed my program and it's now exiting correctly. Thank you for your prompted response!