Step 1: Creating an Alias File

To accomplish its preprocessing tasks, Boomerang references an alias file that contains preprocessor-specific commands and instructions.

To create an alias file for a preprocessor, perform the following steps on the server:

  1. From a command line, navigate to where boomerang.exe is installed, type boomerang and press return.

    The following usage information appears:

    Server usage:
     boomerang -alias
     boomerang -access
     boomerang -kill [-n portnum]
     boomerang -start [-c config] [-e error] [t #] [-f] [-n portnum]
    Client usage:
      boomerang -server server[:port]
                -alias alias
                -include pattern [pattern ...]
                [-placePo preprocessor-output-file]
                [-Pe preprocessor-error-file]
                -Sf source-file
  2. Access the alias menu by typing the following command:
     boomerang -alias

    The following alias menu options appear:

    Enter the name of the alias file: [/etc/boomerang_alias.ini] boomerang_alias.ini
    Boomerang Alias file options
    1 - Add an alias entry
    2 - Remove an alias entry
    3 - Modify an alias entry
    4 - Display alias entries
    5 - Exit
    Enter choice [4]: 1
  3. Select option 1 create an alias file. The following menu appears:
    Add an alias
    Enter the alias name: 
    Enter the name of the precompiler: 
    Enter precompiler options:
    Enter precompiler directives:
    Enter required precompiler extension if any: 
    Press <Return> to continue...

The alias creation fields are defined as follows:

Field Description
Alias name The name you wish to give your alias.
Name of precompiler The precompiler that should be used by this alias. You can also specify the name of a shell script to run instead of the precompiler name. This is necessary for some precompilers like DB2 where certain setup instructions are required before precompiling can commence. See DB2 Alias Example for more information.
Precompiler options Instructions you wish to give to the preprocessor. Boomerang includes several keywords you can use to specify several basic files:
  • B_INPUT: Input to the preprocessor. This is replaced with the name specified by the -Sf option from the Boomerang client command. If you are executing Boomerang from the ACUCOBOL-GT compiler, the compiler automatically calls the Boomerang Client with the -Sf option and the name of the program to be preprocessed.
  • B_OUTPUT: Output from the preprocessor. This is replaced with the name specified by the -placePoBoomerang client command. By default, the ACUCOBOL-GT compiler expects the output from the preprocessor to be named acu_?_pp1.out with two underscores. If you do not specify the -placePo option, Boomerang will replace this keyword with the default name acu_?_pp1.out.
  • B_ERROR: Error output from the preprocessor. This is replaced with the name specified by the -PeBoomerang client command. If you do not specify the -Pe option, Boomerang will replace this keyword with the default name acu_?_pp1.std with two underscores. The ACUCOBOL-GT compiler automatically displays the contents of this file to the screen.
Precompiler directives    Used to specify any keywords that the preprocessor recognizes as directives. Boomerang will automatically insert ACUCOBOL-GT line directives before and after these keywords. In cases involving compilation errors, this makes it easier for you to identify the offending line of code in the source file.
Required precompiler extension Your COBOL program can have any extension you want, but some precompilers require a specific extension. If your precompiler requires a specific extension on the source file, specify it here rather than changing the extension name of your source files. Boomerang creates a temporary file on the server with the extension you specify so that preprocessing can be performed. Boomerang will then remove this temporary file. If you do not specify an extension here, it will use the extension of the source file. There is a case where the extension of the source file is not used - when you are calling two or more preprocessors. In this case, the output of the first preprocessor is called acu_?_pp1.out and is used as input to the second preprocessor. If the second preprocessor requires a specific extension, you can specify the expected extension here. For example, if the precompiler requires a source file extension of .ccp, you would need to specify .ccp as the required precompiler extension. Otherwise, the precompile will fail. See Calling Two or More Preprocessors for more information on calling two or more preprocessors.