Here are some low level explanations about the translations of cycles in the UML-to-COBOL process. Understanding the rationale of the transformation process may help you better design your activity diagram.
For example, Figure 1 shows an infinite loop (WHILE TRUE):
In this diagram, there is a loop that contains the "Read resource" node, the decision node and the "WriteResource2" node. The second branch of the decision node, which leads to an End Node, needs to be considered by the transformation process: the test is part of the loop and so are all of its branches. All the branches of a decision node that are located within a loop need to be taken into account and the corresponding code placed inside the loop.
An UNTIL loop is shown in Figure 2.
In this diagram, we have a loop between the Read Resource node and the decision node. This is a case where one extremity of the loop is a decision node, and it is interpreted as an until loop; the decision node here defines the condition to stay or exit the loop.