ContentsIndexPreviousNext

2.1.15 Help, Version Information, and Communication With C Programs

You can get a summary of command line options by using the following command:

ccbl  -help

You can get the copyright notice and version information with this command:

ccbl  -v

You can get configuration information with the following command:

ccbl -vv

You can find all of the level 78s in a COPY library and create equivalent C-language "#define" statements with the following command:

ccbl  -defines  filename

You can use the "-defines" option to simplify communication between COBOL and C programs.

One specific use of this option is to simplify the creation of Windows Help files when you are building context-sensitive help. Use this option to map context ID strings to context numbers for use with Windows Help files. First create a COPY library with level 78s that map the context IDs (strings) from your help file to unique context numbers (the Windows Help API function WinHelp requires a number as the context ID parameter). Then when you specify "ccbl -defines," the compiler creates a file containing "#defines" that correspond to the level 78s in the COPY library you created.

The "-defines" option must be followed (as the next separate argument) by the name of the COPY library. By default it creates a file having the same base name and the extension ".h". For example, if your COPY library were named "PRHELP.DEF," then you could use this command:

CCBL -DEFINES PRHELP.DEF

to create the file "PRHELP.H" that contains one "#define" for each level 78 in "PRHELP.DEF."

Be aware that any hyphens in the level 78 names are converted to underscores in the corresponding "#define." Although hyphens are allowed in COBOL and in the help file, hyphens are not allowed in C names. See section 10.4 in Book 2, "User Interface Programming" for more information about Windows Help files.