Warnings and Restrictions

Consider the following when using the MFUPP preprocessor:

  • The preprocessor is designed for use with procedural programs. It does not support the use of class types; therefore the following paragraph types are ignored: class-id, method-id, delegate-id, enum-id, iterator-id, valuetype-id, operator-id, and the Factory paragraph. If the preprocessor encounters this type of syntax, it outputs a warning message that parsing is suspended for that class.
  • The mocking of a program relies on recursion, as calls are continually made back and forth with the controller in the test case. If the source code under test is not already compiled for recursion (e.g. has IS RECURSIVE clause, compiled with REENTRANT, contains LOCAL-STORAGE section), ensure that the INSERT-LS preprocessor directive is set, which will insert a LOCAL-STORAGE section into the source for the purposes of the test. This directive is set by default, but it is possible to switch it off; in which case, you must rely on the source containing one of the recursion settings mentioned, otherwise your tests will fail with a COBRT166 Recursive COBOL CALL is illegal error.
  • If the preprocessor inserts some code that is not permitted under the dialect of the source code, you may receive a COBCH1078 Setting of directives inline / conditional compilation / region syntax error. In such circumstances, you may try to change the dialect of the source for the purposes of the test. Alternatively, you may be able to use the DIRECTIVES-IN-COMMENTS directive to ignore $set statements when running under no-MF dialects.