Rational Programming Patterns

OnLine Systems Development and Pacbench C/S micropatterns

You can insert these micropatterns in the COBOL code of all the Screen and Server types with the PDP COBOL editor, or in the code of a Macro with the PDP Macro editor.

Branching micropatterns

These micropatterns generate GO TO statements.

You must conform to the following input format:
      *{GXX
      *}
where:
  • *{ is the required start tag of the micropattern. The * must be entered in column 7, reserved for the comments in the COBOL code, and the { must be entered in column 8.
  • GXX is the micropattern identifier: GF, GFA, GD or GDB.
  • *} is the required end tag of the micropattern. The * must be entered in column 7, reserved for the comments in the COBOL code, and the ] must be entered in column 8.
These micropatterns generate different types of branching:
  • GF branches to the end of the automatic function or subfunction in which the line is inserted.
    Note: It can be inserted in *X-type subfunctions associated with automatic subfunctions (F20, F25, and so forth).
    It generates:
      GO TO FFFSS-FN.
    where FFSS is the code of the associated automatic function or subfunction.
  • GFA branches to the end of the display processing:
      GO TO END-OF-DISPLAY.
  • GFR branches to the end of the reception processing
      GO TO END-OF-RECEPTION.
  • GDB branches to the beginning of the current iteration.
      GO TO FFFSS-FN.
    where FFSS is the function or subfunction code.

Micropatterns for calling Screens or C/S Screens

Micropatterns for Segment accessing

You must conform to the following input format
      *{XAA "SEGM"
      *}
where:
  • *{ is the required start tag of the micropattern. The * must be entered in column 7, reserved for the comments in the COBOL code, and the { must be entered in column 8.
  • XAA is the micropattern identifier (see the table for the list of the identifiers).
  • " " must frame the operands.
  • SEGM is the Segment code.
  • *} is the required end tag of the micropattern. The * must be entered in column 7, reserved for the comments in the COBOL code, and the ] must be entered in column 8.
Note: The Segment code is not controlled.
Table 1. Micropatterns for Segment accessing
Micropattern identifiers Generated result
XD Deletion of the Segment indicated in the operands
XP Read of the first record through a dynamic access. This micropattern always retrieves a record.

Reserved for Segments defined in a repetitive category with a display use.

XR Read of the Segment indicated as the operands
XRN Sequential read of the Segment indicated in the operands (dynamic access)

Reserved for Segments defined in a repetitive category with a display use.

XRU Read before update of the Segment indicated in the operands
XRW Rewrite of the Segment indicated in the operands
XUN Unlock of the Segment indicated in the operands. (except for DL1).
XW Write of the Segment indicated in the operands
Note: For the OnLine Systems Development function, these micropatterns can generate the corresponding access function. When the Segment is an SQL view or table, make sure that the Segment is defined in the Screen with either a reception or a display use.
These micropatterns generate the following elements:
  • A PERFORM statement for the physical access to the Segment indicated in the operand
  • The corresponding statement in function F80 for the files with a V (VSAM) organization

Other micropattern related to Segment accessing

The YAA micropattern generates the F80-SEGM-AA tag. This tag is used when the physical accesses to the Segment indicated in the operands are replaced.

You must conform to the following input format
      *{YAA "SEGM"
      *}
where:
  • *{ is the required start tag of the micropattern. The * must be entered in column 7, reserved for the comments in the COBOL code, and the { must be entered in column 8.
  • YAA is the micropattern identifier. AA represents the last two characters of the Segment accessing operator (R for READ, W for WRITE, RW for REWRITE, D for DELETE.for example).
  • " " must frame the operands.
  • SEGM is the Segment code.
  • *} is the required end tag of the micropattern. The * must be entered in column 7, reserved for the comments in the COBOL code, and the ] must be entered in column 8.
Note: The value of the Segment accessing operator and the Segment code are not controlled.

Micropatterns for error positioning

These errors are detected by specific code. They can be associated with a Data Element called on a Screen , C/S Screen, or Server (ERR micropattern), or they can be common to all the Screens of a Dialog or all the Servers of a Server Dialog (ERU micropattern).
  • Enter the ERR micropattern with the following input format:
          *{ERR "N DELCO IND" LV="VIEW"
          *}
    where:
    • *{ is the required start tag of the micropattern. The * must be entered in column 7, reserved for the comments in the COBOL code, and the { must be entered in column 8.
    • ERR is the micropattern identifier.
    • " " must frame the operands.
    • N is the error code, on one position. This code is an alphanumeric character (except for '0' or '1', which are reserved for the coding of documentary messages).
    • DELCO is the variable Data Element with which the error code is associated. Entering this Data Element is required.
    • IND is an optional operand, specific to Servers. It represents an index. Its code and length are free.
    • LV="VIEW" is an optional attribute, specific to Servers. view represents the code of a Logical View. You specify this attribute only if there is no Logical View, to generate the micropattern with this Logical View.
    • *} is the required end tag of the micropattern. The * must be entered in column 7, reserved for the comments in the COBOL code, and the ] must be entered in column 8.
    The error message corresponding to the error code is specified on the -GE Lines of the Screen. The cursor will be positioned and the Data Element will take on the attributes defined for the Data Elements in error.
    Note: For a repetitive Data Element, its code is indicated, followed by the sequence number of the Data Element instance (DELCO (2) for example).
  • Enter the ERU micropattern with the following input format:
          *{ERU "NNNN DELCO"
          *}
    où :
    • *{ is the required start tag of the micropattern. The * must be entered in column 7, reserved for the comments in the COBOL code, and the { must be entered in column 8.
    • ERU is the micropattern identifier.
    • " " must frame the operands.
    • NNNN is the error code, on four positions, managed by the user.
    • DELCO is the erroneous Data Element. Entering this Data Element is optional.
    • *} is the required end tag of the micropattern. The * must be entered in column 7, reserved for the comments in the COBOL code, and the ] must be entered in column 8.
    The error message corresponding to the error code is specified on the -GE Lines of the Dialog. This message will be displayed on the error message line (ERMSG). If a Data Element has been specified, the cursor will be positioned on the Data Element, and error attributes will apply.
    Note: This micropattern cannot be used on a repetitive Data Element.

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)