Troubleshooting: COBOL copybook schemas

You can use a workaround to problem that you can encounter after you import a COBOL copybook schema into HCL OneTest API.

Memory allocation for schemas

COBOL copybook schemas can be of variable size. When such a schema is applied to a message in Test Factory, HCL OneTest API first attempts to create the largest possible structure the Copybook in its memory. This process uses a lot of CPU resource and memory, and might result in the program becoming unresponsive.

To resolve the problem, either reduce the maximum size of the repeat in the COBOL copybook or use Library Manager to increase the memory allocation for HCL OneTest API.
  • To reduce the number of repeats in the copybook:
    1. Open the Copybook file in a text editor.
    2. Look for occurrences of the OCCURS x TO y TIMES DEPENDING ON directive where y is a very large number, for example, 05 ITEM OCCURS 0 TO 999999 TIMES DEPENDING ON ITEM-COUNT.
    3. Change the TO number, for example, 05 ITEM OCCURS 0 TO 100 TIMES DEPENDING ON ITEM-COUNT. Save the file.
    4. Go to Schema Library, and either rebuild the schema or delete it and import it again.
    5. Apply the new schema to the message.
  • To increase the memory allocation for HCL OneTest API, see Working with Library Manager.