Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.
You write and execute local code specifically in one program. It can consist of a main paragraph, other paragraphs that the
main paragraph performs, and Data Division source code for the paragraphs. You write local code in the Program Painter. When
you generate your program, AMB inserts the code in the program and generates a PERFORM statement to perform it.
Observe the following coding rules.
- On the first line, enter COBOL S-COBOL statements starting in column 12 and continue onto as many lines as you need. Do not
enter the PARA keyword or a paragraph name; AMB generates a paragraph name for the code and displays it in the Program Painter.
In the code, you can perform additional paragraphs that you write elsewhere in the code. See
S-COBOL Structures for more information.
- To define a paragraph that the code performs, enter the PARA keyword in the KYWD column (columns 8-11) and the paragraph name
starting in column 12 on the same line. On the following lines, enter your paragraph statements.
- After all paragraphs, define any Data Division source for the paragraphs, such as data items that the code references. To
do so, use AMB Data Division keywords. See
Program Painter Keywords for more information.
For example:
statement
.
.
.
PERFORM paragraphname [(arguments)]
PARA paragraphname [(+|-arguments)]
statement
.
.
.
WS
01 groupleveldataitem
05 elementarydataitem
.
.
.