Micropattern to condition the processing according to a variable
The CO (CASE OF) micropattern can be inserted in the code of a Macro only. It can be used to test a variable, which corresponds to the value of a Data Element, in the dependent lower-level subfunctions of the Macro.
Input format
You must conform to the following input format:
*!CO "OPERAND1"
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.
- CO is the micropattern identifier.
- " " must frame the operands.
- OPERAND1 is the Data Element whose value is tested.
All the explanations about the insertion of the CO loop and its possible transformation into the EVALUATE COBOL statement can be found in Particular cases of the DO and CO loops.