Dialog and Client/Server micropatterns

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

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, GFR, or GDB.
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 to call Screens or C/S Screens

Micropatterns to access Segments

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.
Note: The Segment code is not controlled.
Table 1. Micropatterns for Segment access
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 2 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.
Note: The value of the Segment accessing operator and the Segment code are not controlled.

Micropatterns to position errors

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.
    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"
    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.
    • 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.
    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.

Micropattern to generate the automatic function labels in the Business Component

The Y micropattern can be indicated in Business Components only. It generates the label of an automatic function or subfunction that was replaced with specific code (*R).

Enter the Y micropattern with the following input format:
      *!Y
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.
  • Y is the micropattern identifier.

Micropattern to generate the list of PCBs

The PCB micropattern can be indicated in the WORKING-STORAGE SECTION or PROCEDURE DIVISION of a standard Screen, client Screen, or Server. It is used to generate the list of the PCBs that are associated with the PSB. The PSB is indicated in the Screen (PSB= option in the -GG Lines) or the Dialog (Complement tab).

Enter the PCB micropattern with the following input format:
      *!PCB
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.
  • PCB is the micropattern identifier.

Feedback