Understanding Decisions

A decision is a reference to another object, a program or screen, for example, that is not resolved until run time. Consider a Cobol program that contains the following statement:

CALL ‘NEXTPROG’.

The COBOL Analyzer parser models the transfer of control to program NEXTPROG by creating a Calls relationship between the original program and NEXTPROG.

But what if the statement read this way instead:

CALL NEXT.

where NEXT is a field whose value is only determined at run time. In this case, the parser creates a Calls relationship between the program and an abstract decision object called PROG.CALL.NEXT, and lists the decision object with a icon in the tree view of the Repository Browser.

The Decision Resolution tool creates a list of such decisions and helps you navigate to the program source code that indicates how the decision should be resolved. You may learn from a declaration or MOVE statement, for example, that the NEXT field takes either the value NEXTPROG or ENDPROG at run time. In that case, you would resolve the decision manually by telling the system to create resolves to relationships between the decision and the programs these literals reference.

Of course, where there are hundreds or even thousands of such decisions in an application, it may not be practical to resolve each decision manually. In these situations, you can use the autoresolve feature to resolve decisions automatically.

The Decision Resolution tool analyzes declarations and MOVE statements, and any other means of populating a decision point, to determine the target of the control or data transfer. The tool may not be able to autoresolve every decision, or even every decision completely, but it should get you to a point where it is practical to complete decision resolution manually.