List of micropatterns and snippets

The micropatterns and snippets insert one or more code lines. The following tables list all the micropatterns and snippets that are recognized in Rational® Programming Patterns.

The tables contain the following columns:
  • The first column contains the micropattern or snippet name.
    • The micropattern name corresponds to the micropattern identifier as it is inserted in the code. For the micropatterns that can be inserted through a calling snippet, the micropattern name of the first column also corresponds to the micropattern name in the Snippets view. For the micropatterns that are recognized only to produce a code identical to the Pacbase code, the indication "data retrieval" is added between parentheses.
    • The snippet name corresponds the snippet function as it is listed in the Snippets view.
  • The "Micropatterns" column indicates whether the micropattern exists ("Y") or does not exist ("N"). A micropattern is inserted in the code as a formatted comment. If a micropattern does not exist, then the snippet exists.
  • The "Micropattern calling snippets" column indicates whether micropatterns can be inserted in the code through micropattern calling snippets. A "Y" in this column indicates that a calling snippet exists for a micropattern. An "N" is indicated otherwise. There are no calling snippets for the micropatterns that are recognized for data retrieval only.
  • The "Snippets" column indicates the existence ("Y") or absence ("N") of snippets. These snippets do not insert micropatterns and exist only if the corresponding micropatterns do not exist. They make the code insertion easier with an insertion wizard. The inserted code keeps no trace of the snippet declaration.

Micropatterns and snippets for the Pacbase operators

Table 1. Pacbase operators recognized as micropatterns or snippets in Rational Programming Patterns.
Pacbase operators Micropatterns Micropattern calling snippets Snippets
(blank) Y (data retrieval) N N
*: Comment Y (data retrieval) N N
A: Addition of the first operand to the following operands Y (data retrieval) N N
AD: Transformation of the date without windowing and initialization of the century according to the entity Y Y N
AD0: Transformation of the date without windowing Y N N
AD1: Transformation of the date without windowing and initialization of the century according to the first operand Y N N
AD2: Transformation of the date with windowing and initialization of the century according to the first operand Y N N
AD6: Call of system date on 6 characters (Screens and Servers) Y N N
AD8: Call of system date on 8 characters (Screens and Servers) Y N N
ADC: Call of system date with century Y N N
ADE: Insertion of slashes in a date on 6 characters (Programs) Y N N
ADI: Replacement of the first 2 characters by the last 2 characters of a date on 6 characters (Programs) Y N N
ADM: Insertion of slashes in a date with century (Programs) Y N N
ADS: Inversion of a date with century (Programs) Y N N
ADT: Call of system date without century Y N N
CAL: Call of the program or subprogram indicated in the operand Y (data retrieval) N N
CLO: Closing of the file indicated in the operand (Programs) Y Y N
COA: Pure COBOL code justified at margin A (Programs) Y (data retrieval) N N
COB: Pure COBOL code justified at margin B (Programs) Y (data retrieval) N N
DAD: Computation of number of days between two dates Y Y N
DAO: Addition or subtraction of days from a date Y Y N
DEL: Generation of the DELETE COBOL statement Y (data retrieval) N N
DV: Division of the second operand by the first operand Y (data retrieval) N N
EEV: Generation of the END-EVALUATE COBOL statement Y (data retrieval) N N
EIF: Generation of the END-IF COBOL statement Y (data retrieval) N N
ERR: Standard error on a Data Element Y Y N
ERU: User error Y Y N
EVA: Generation of the EVALUATE COBOL statement Y (data retrieval) N N
Insertion of EVALUATE statement N N Y
EXC: EXEC CICS operands END-EXEC Y (data retrieval) N N
EXS: Call of a Folder manager Y (data retrieval) N N
GB: Exit from the current iteration Y Y N
GDB: Branching to the beginning of the current iteration (Screens and Servers) Y Y N
GDI: Branching to the beginning of the current iteration with the highest level Y Y N
GF: Branching to the end of the automatic subfunction (Screens and Servers) Y Y N
GFA: Branching to the end of the selection processing (Screens and Servers) Y Y N
GFR: Branching to the end of the reception processing (Screens and Servers) Y Y N
GFT: Branching to the end of the current processing Y Y N
GT: Branching to the end of the function or subfunction Y Y N
INI: Generation of the INITIALIZE COBOL statement Y (data retrieval) N N
M: Move of the first operand into the following operands Y (data retrieval) N N
MA: Move of the first operand into the following operands with the MOVE ALL COBOL statement Y (data retrieval) N N
MCI: Move of identical dependent Data Elements with the MOVE CORRESPONDING COBOL statement Y Y N
MES: Display of the constants or parameters indicated in the operands (DISPLAY) Y (data retrieval) N N
N: Title of the function or subfunction Y (data retrieval) N N
OPE: Opening of the file indicated in the operand (Programs) Y Y N
OSC: Call of the Screen indicated in the operand (Screens) Y Y N
OSD: Call of the Screen indicated in the operand after the reception processing (Screens) Y Y N
OTP: Call of a Screen with its external name (Screens) Y Y N
P: Generation of the PERFORM COBOL statement Y (data retrieval) N N
R: Read of the file indicated in the operand (Programs) Y Y N
RN: Read of the next record of the file indicated in the operand (Programs) Y Y N
RW: Rewrite of the file indicated in the operand (Programs) Y Y N
S: Subtraction of the first operand from the second operand Y (data retrieval) Y N
SCB: Search in a sorted table N N Y
SCH: Search, in the table indicated in the first operand, for the Data Element indicated in the second operand N N Y
SQL: Recognition of SQL customized access Y Y N
STA: Generation of the START COBOL statement Y (data retrieval) N N
STR: Generation of the STRING COBOL statement before the operands Y (data retrieval) N N
SUP: No generation of the automatic subfunction whose code is indicated on this line Y (data retrieval) N N
TIF: Time reformatting Y Y N
TIM: Time display Y Y N
W: Write of the file indicated in the operand (Programs) Y Y N
Xnn: Segment access Y Y N
XD (indicated from Xnn): Deletion of the Segment indicated in the operand Y Y N
XP (indicated from Xnn): Read of the first record with dynamic access Y Y N
XR (indicated from Xnn): Read of the Segment indicated in the operand Y Y N
XRN (indicated from Xnn): Sequential read of the Segment indicated in the operand Y Y N
XRU (indicated from Xnn): Read for update of the Segment indicated in the operand Y Y N
XRW (indicated from Xnn): Rewrite of the Segment indicated in the operand Y Y N
XUN (indicated from Xnn): Unlock of the Segment indicated in the operand Y Y N
XW (indicated from Xnn): Write of the Segment indicated in the operand Y Y N
XT : Call of an elementary processing in a Logical View (Servers only) Y N N
Y: Generation of the tag of the automatic function or subfunction that was replaced through specific code (Business Component) Y Y N
YAA: Generation of the F80-SEGM-AA tag, which is used for the replacement of the physical access to the Segment Y N N

Micropatterns and snippets for execution conditions

Table 2. Micropatterns and snippets that correspond to execution conditions.
Condition types Micropatterns Micropattern calling snippets Snippets
CO: Insertion of a CASE OF condition (Macros) Y Y N
DCD: Comparison between 2 dates (99 COBOL level) Y Y N
DCF: Comparison between 2 dates (function or subfunction COBOL level) Y Y N
DID: Invalid date (99 COBOL level) Y Y N
DIF: Invalid date (function or subfunction COBOL level) Y Y N
DO: Repeated processing (migrated but replaced by the Loop insertion snippet) Y (data retrieval) N N
DU: Repeated processing until the condition is met (migrated but inserted through the subfunction creation wizard) Y (data retrieval) N N
DVD: Valid date (99 COBOL level) Y Y N
DVF: Valid date (function or subfunction COBOL level) Y Y N
DW: Repeated processing while the condition is met (migrated but inserted through the subfunction creation wizard) Y (data retrieval) N N
Loop insertion: Insertion of a PERFORM statement for a repeated processing (equivalent to the Pacbase DO condition) N N Y

Micropatterns and snippets for insertions in the WORKING-STORAGE SECTION

Table 3. Micropatterns and snippets that can be inserted in the WORKING-STORAGE SECTION.
Insertion types Micropatterns Micropattern calling snippets Snippets
WE: Call of a Data Element with retrieval of its input format Y Y N
WF: Call of a Data Structure Y Y N
WI: Call of a Data Element with retrieval of its internal format Y Y N
WS: Call of a Data Element with retrieval of its output format Y Y N
Indexes insertion: Indexes for table size N N Y
Work and linkage area line insertion (Macro) N N Y

Feedback