COBOL Copybooks overview
Use COBOL Copybooks in HCL DevOps Test Integrations and APIs (Test Integrations and APIs) to test COBOL data files or the applications that produce and consume them.
You can add COBOL Copybooks to Test Integrations and APIs and apply them to messages. Copybooks provide a format that is meaningful to the system under test.
Cobol data files do not contain information about their own organization and record structure. If you have a COBOL data file, but no program capable of writing or reading this file, you cannot correctly interpret the data that the file contains.
The information that describes the physical layout of program data, that is, how the records and fields relate to each other, is stored in a Copybook file. This file is included in all of the applications that process the file.
COBOL copybook files are named with .cbl, .ccp, .cob and .cpy extensions, and typically include one or more level 01 structures. These structures can be made available within Test Integrations and APIs as message schemas that can be used to create or parse the data in files or messages.
- Byte array fields, in messages where you can use the Byte Array formatter
- Bytes message types, set within the message body when you are using any of the JMS providers
- Text messages, which you can format based on the applied schema.
- No support for COPY statements
- No support for COMP-4 or COMP-5 types
- All types are represented as strings within Test Integrations and APIs
- Formatting characters (signs) are included in fields that the user works with
- No repeating node support for fields defined by OCCURS clauses
You can overcome many of these limitations by importing the COBOL Copybook as a DFDL schema. See Adding a COBOL copybook as a DFDL schema.