Previous Topic Next topic Print topic


Converting Header Files Using the H2cpy Utility

You can run the Header-to-copy utility directly from the command line or invoke it 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]} ...

where the parameters are:

filename The C-language header file to be converted to a COBOL copybook
option An H2cpy command-line option

If you do not specify filename or option, a list of available options is displayed.

Previous Topic Next topic Print topic