Micropattern to transfer multiple Data Elements

The MCI micropattern generates the transfer of the elementary Data Elements that have an identical name in two group fields. It corresponds to a MOVE CORRESPONDING COBOL statement.

Input format

You must conform to the following input format:
      *!MCI "OPERAND1 OPERAND2"
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.
    Note: If you press CTRL + space bar in the PDP COBOL editor, the content assist facility displays the list of the micropatterns that are adapted to the entity and to the position in the COBOL code (WORKING-STORAGE SECTION or PROCEDURE DIVISION). The micropatterns that are used only to retrieve the Pacbase data are not included in the list. Each micropattern in the list is documented. If you double-click one of them, the start tag and the identifier of the micropattern are inserted in the code. You must then complete its declaration.
  • MCI is the micropattern identifier.
  • " " must frame the operands.
  • OPERAND1 is the source group field of the transfer. OPERAND2 is the target group field.

All the elementary Data Elements with identical names in both group fields are transferred. These names correspond to the character strings after the first dash (-).

Indenting the generated lines of a micropattern

You can indent the generated lines of a micropattern by entering indent=nn (where nn is a number) anywhere in the micropattern declaration line. The new indentation is effective after a new generation.

The indentation applies to the first generated line of the micropattern. The position difference, if any, with the next generated lines is kept relatively to the first newly indented line. For example, the initial indentation of the first generated line is 11. If you enter indent=20 and generate again, the new indentation of the first line becomes 20. So, the first line starts in position 21. The position of the next lines is moved to the right by 9 positions to keep the initial position difference.

The newly indented lines undergo the following controls upon the new generation:
  • They cannot exceed column 72.
  • They must start in the margin B of the COBOL code if they are in the PROCEDURE DIVISION or are generated from a WI, WE, or WS micropattern.
  • The 01 and 77 levels of the lines that are generated from the WF micropattern must be in the margin A of the COBOL code.

If at least one generated line cannot be indented with the requested indentation, all the generated lines are set with the default indentation. The indent=nn indication is then ignored and the Invalid indentation value warning is displayed in the PDP COBOL editor and in the Problems view.


Feedback