Program Painter Keywords

Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

Purpose:

Program Painter keywords designate program Divisions and Sections. The keyword you choose determines the location of your program code within the generated program.

Program Painter keywords also designate blocks of code within which all other categories of AMB structures are coded. Following any keyword, you can enter

Code keywords in the Program Painter for batch, report, or complex online programs, or Online Express.

Program Painter keywords:

The following lists the keywords and their logical placement in a program.

Location Keyword
Beginning of program SYM1 Define rule variables.
SYM2 Call user-defined rules after any rule libraries named in Project Explorer.
IDENTIFICATION DIVISION REM Create COBOL comments in the Considerations Section. Not valid for COBOL II.
ENVIRONMENT DIVISION SPNM Create Special-Names paragraph
SYEN Call user-defined rules in Special-Names paragraph.
Input/Output Section SYIO Call user-defined rules after any rule libraries.
IO Code SELECT statement.
DATA DIVISION SYDD Call user-defined rules at the beginning of the Data Division.
File Section SYFD Call user-defined rules after any rule libraries included.

FD

SD

Code File Description or Sort Description statement.
Record description 01 Code record description in COBOL format.
DS Specify name of data structure defined in Data Structure Editor containing record description.
REC Specify name of data structure defined in Data Structure Editor containing record description. Structure must be coded in Data Structure Editor format (see Data Structures).
Working-Storage Section SYWS Call user-defined rules after any rule libraries and data structures named in Project Explorer.
WS Designate Working-Storage section.
Data definitions 01 Code data structure in COBOL format.
DS Specify name of data structure defined in Data Structure Editor containing data definition.
REC Specify name of data structure defined in Data Structure Editor containing data definition. Structure must be coded in Data Structure Editor format (see Data Structures).
++ Character-based applications only. Specify PANVALET member name containing data definition.
SQL Designate DB2 table or cursor.
Linkage Section SYLT Call user-defined rules after any rule libraries and data structures named in the Project Explorer and preceding any SYLK code.
SYLK Call user-defined rules after any rule libraries and data structures named in the Project Explorer.
LK Designate Linkage Section.
Data definitions 01 Code data structure in COBOL format.
DS Specify name of data structure defined in Data Structure Editor containing data definition.
REC Specify name of data structure defined in Data Structure Editor containing data definition. Structure must be coded in Data Structure Editor format (see Data Structures).
++ Character-based applications only. Specify PANVALET member name containing data definition.
SQL Designate DB2 table or cursor.
Report Section SYRP Call user-defined rules after any rule libraries.
RED Create a Report Section and specify the report name.
MOCK Identify the report mock-up.
01 Specify the type of report line, such as header, footer, detail.
PROCEDURE DIVISION

NTRY

PROC

Designate the Procedure Division; generate program skeleton and program invocation logic.
OPT Suppress generation of program invocation logic.
PARA Designate S-COBOL or COBOL paragraph.
STUB Name the global code to be inserted.
Declaratives Section DECL Create a Declarative Section without paragraphs; code declarative statements.
DPAR Create a Declarative Section paragraph; code declarative paragraph statements.
Bottom of program SYBT Call user-defined rules.
Anywhere in the program /* Code comments. The /* keyword does not end the action of the current keyword; the next keyword ends the current one.
FRFM Pass associated COBOL or S-COBOL statements through the generator without translation and move the statements four columns to the left.

Coding Conventions:

Pass-Through Keyword:

The SQL keyword enables you to code and pass through native SQL calls, without translation, to the precompile process.

Examples:

The following examples include all AMB keywords that you can enter in the Program Painter when creating online or batch programs. They illustrate:

Online programs:

*SYM1 keyword places Customizer code here
*user rules from Appl View where Location=Top of program
*SYM2 keyword places Customizer code here
 IDENTIFICATION DIVISION.  
          .
          .
          .
*/* keyword places comments here
 REMARKS.  REM keyword places comments here (COBOL)
 ENVIRONMENT DIVISION.  
          .
          .
          .
 SPECIAL-NAMES.  SPNM keyword places code here
*SYEN keyword places Customizer code here
 DATA DIVISION.  
*SYDD keyword places Customizer code here
 WORKING-STORAGE SECTION.  
*user rules from Appl View where Location=Top of W-S
*data structures from from Appl View where Location=Top of W-S
*user rules from Appl View where Location=Working-Storage
*SYWS keyword places Customizer code here
*WS  keyword, followed by any of the following six 
*    keywords that you enter on the next line
*01   keyword
*REC  keyword
*DS   keyword
*SQL  keyword
*FRFM keyword
*user rules from Appl View where Location=Bottom of W-S
*CA, CA05, CADS keywords place code here in CICS, IMS, 
*    DLG parent pgms
 LINKAGE SECTION.  
*user rules from Appl View where Location=Top of Linkage
*data structures from Appl View where Location=Linkage Section
*user rules from Appl View where Location=Linkage Section
*SYLT keyword places Customizer code here
*SYLK keyword places Customizer code here
*LK  keyword, followed by any of the following six 
*    keywords that you enter on the next line
*01   keyword
*DS   keyword
*REC  keyword
*SQL  keyword
*FRFM keyword
*CA, CA05, CADS keywords place code here in DLG child programs
*user rules from Appl View where Location=Bottom of Linkage
 PROCEDURE DIVISON.  NTRY|PROC keyword generates this stmt
*OPT keyword places code here
          .
          .
          .
*PARA keyword places code here
          .
          .
          .
*STUB keyword places code here
          .
          .
          .
*user rules from Appl View where Location=Bottom of program
*SYBT keyword places Customizer code here
*End of program.  

Batch programs:

*SYM1 keyword places Customizer code here
*user rules from Appl View where Location=Top of program
*SYM2 keyword places Customizer code here
 IDENTIFICATION DIVISION.  
          .
          .
          .
*/* keyword places comments here (COBOL II)
 REMARKS.  REM keyword places comments here (COBOL)
 ENVIRONMENT DIVISION.  
          .
          .
          .
 SPECIAL-NAMES.  SPNM keyword places code here
*SYEN keyword places Customizer code here
 INPUT-OUTPUT SECTION.  
*user rules from Appl View where Location=Top of I/O Section 
*SYIO keyword places Customizer code here
 FILE-CONTROL.  
*IO   keyword places code here
          .
          .
          .
 DATA DIVISION.  
*SYDD keyword places Customizer code here
 FILE SECTION.  
*user rules from Appl View where Location=Top of File Section
*FD keyword places code here
*SD keyword places code here
 WORKING-STORAGE SECTION.  
*user rules from Appl View where Location=Top of W-S
*data structures from from Appl View where Location=Top of W-S
*user rules from Appl View where Location=Working-Storage
*SYWS keyword places Customizer code here
*WS  keyword, followed by any of the following six 
*    keywords that you enter on the next line
*01   keyword
*REC  keyword
*DS   keyword
*SQL  keyword
*FRFM keyword
*user rules from Appl View where Location=Bottom of W-S
 LINKAGE SECTION.  
*user rules from Appl View where Location=Top of Linkage
*data structures from Appl View where Location=Linkage Section
*user rules from Appl View where Location=Linkage Section
*SYLT keyword places Customizer code here
*SYLK keyword places Customizer code here
*LK  keyword, followed by any of the following six 
*    keywords that you enter on the next line
*01   keyword
*DS   keyword
*REC  keyword
*SQL  keyword
*FRFM keyword
*user rules from Appl View where Location=Bottom of Linkage
 PROCEDURE DIVISON.       /*NTRY keyword generates this stmt
 PROCEDURE DIVISON USING. /*PROC keyword generates this stmt
 DECLARATIVES.          /* DECL keyword generates this stmt
 DECLARATIVES SECTION.  /* DPAR generates this stmt
*DPAR keyword places code here
 END DECLARATIVES.
*OPT keyword places code here
          .
          .
          .
*PARA keyword places code here
          .
          .
          .
*STUB keyword places code here
          .
          .
          .
*user rules from Appl View where Location=Bottom of program
*SYBT keyword places Customizer code here
*End of program.