Previous Topic Next topic Print topic


PARA

Indicate a paragraph in your program code. A paragraph is a Procedure Division routine that you write and perform specifically for one program. Use paragraphs to perform the following, depending on which AMB tool you use
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.
Use paragraphs in . . . To perform . . .
Online Express Custom actions for events
Program Painter Custom routines in the Procedure Division

Syntax: for Format 1

 PARA   paragraphname [SECTION.]
        paragraphcode

Syntax: for Format 2

             .
             .
        PERFORM paragraphname [(arguments)]
             .
             .
 PARA   paragraphname [(+|-arguments)]
        statement
             .
             .
             .
        PERFORM subparagraphname [(arguments)]
 PARA   subparagraphname [(+|-arguments)]
        statement
             .
             .
             .
 WS
 01     group-level-data-item
        05  elementary-data-item
             .
             .
             .

Comments:

  • Use Format 1 with SECTION to code a SORT procedure.
  • The keyword PARA, followed by a paragraph name with an optional list of arguments, denotes a paragraph. Within a paragraph, indentation determines the exact positioning of its logic statements, or statement blocks.
  • A paragraph ends with the next appearance of any Procedure Division keyword, except the comment keyword (/*); there is no need to code an END-paragraphname.
  • Code at least one PERFORM statement before any PARA keywords in your program. Generally, you code a PERFORM statement that performs your main logic paragraph.

Paragraph Rules

Rules for coding paragraphs in Client and Online Express.

  • A paragraph can consist of a main paragraph, other paragraphs that the main paragraph performs, and Data Division source code for the paragraphs.
  • For each paragraph, enter the PARA keyword in the KYWD column and the paragraph name in column 12 on the same line. On the following lines, enter COBOL, COBOL II, or S-COBOL paragraph statements. Do not use any other AMB keywords in paragraphs.
  • After all paragraphs, use AMB Data Division keywords to define data items that the paragraphs reference.

Rules for coding paragraphs in the Program Painter.

  • A paragraph can perform other paragraphs.
  • For each paragraph, enter the PARA keyword in the KYWD column and the paragraph name in column 12 on the same line. On the following lines, enter COBOL, COBOL II, or S-COBOL paragraph statements. Do not use any other AMB keywords in paragraphs.
  • Anywhere in the program, use AMB Data Division keywords to define any data items that the paragraphs reference.
Previous Topic Next topic Print topic