The Header-to-copy utility can be run directly from the command line or it can be invoked automatically using the PREPROCESS(headers) Compiler directive. The Headers preprocessor allows C header files, with an extension of .h, to be specified in a COPY statement in a COBOL source file. The preprocessor recognizes these as C header files and uses the Header-to-copy utility to convert them. This can be very convenient for relatively small header files.
To invoke the Header-to-copy utility from the command line, type:
h2cpy {[filename] [option]} ...
If you do not specify option or filename, a list of available options is displayed.
Do not specfiy the __cplusplus macro as H2cpy is not suitable for C++ headers.
ANSI C predefined macros that might need to be specified on the command line using the -D option include:
Groups of macro definitions can be held in the h2cpy.dir file. See the h2cpy option -G option for details.