Overview [ Micro Focus COBOL System Reference, Volume 1 ] MPE/iX 5.0 Documentation
Micro Focus COBOL System Reference, Volume 1
Overview
The H2cpy utility translates C-language header files into their COBOL
equivalent COPY-files. Specifically, it converts:
* #define statements into COBOL level-78 definitions where
appropriate.
* typedef statements into the equivalent COBOL data definitions.
H2cpy also recognizes the #if, #ifdef, #ifndef, #else, #endif, and
#include statements and acts on them accordingly. This means that only
the definitions required are translated.
H2cpy lets you control the format of the .cpyfile. You can set the case
of the text, the starting-level number, the line indentation for
successive levels, and the line position at which the PICTURE and VALUE
clauses are placed. You can also choose how structure fields are to be
accessed from a COBOL program and whether translated definitions are
placed in one file or in multiple files.
H2cpy does not translate every type of entry that can appear in a C
header file; this can be more significant in environments such as Windows
where header files may contain such entries. See the section H2cpy
Limitations for a more detailed description.
The generated COPY-files resulting from H2cpy can be very big. These
files can be further split to make them easier to manage. The utility
split78processes a COPY-file containing 78-level items and splits it into
several COPY-files. Each 78-level item starting with the same prefix is
placed in the same COPY-file.
MPE/iX 5.0 Documentation