+

Search Tips   |   Advanced Search

Create a call stub generator configuration file

We can create the call stub to identify the Rational Application Developer installation location and to control Java data binding code generation

Create a Rational Application Developer project for the code that is generated by the COBOL call stub generator.

The call stub generator configuration file contains settings to identify the Rational Application Developer installation location and to control Java data binding code generation. The configuration file location is specified by the -configFile setting for command-line invocations or by the configFile attribute in the <csg> tag for Ant invocations.

Ensure that the EclipseHome, WorkSpace, and EclipseProjectName required settings in the configuration file are correct for the Rational Application Developer installation.

  1. Open an editor and create a call stub generator configuration file.

    The call stub generator configuration file can have any name. Examples for the COBOL call stub generator in this information center use the csg.properties file name.

  2. Specify COBOL call stub generator settings in the configuration file.

    The following table describes the call stub generator settings.

    COBOL call stub generator. Use these properties to specify the Rational Application Developer installation
    Name Default value Required or Optional Description
    EclipseHome

    /opt/IBM/SDP

    C:/IBM/SDP

    Required Fully qualified path to the root directory where Rational Application Developer, or Eclipse, is installed in the file system.

    Avoid trouble: Use forward slashes (/), or remember to escape the back slashes (\\), in all path names.gotcha

    WorkSpace
    Required Fully qualified path to the root directory of the Rational Application Developer, or Eclipse, workspace to be used to create the Java data binding class.
    EclipseProjectName
    Required Name of the project in the Rational Application Developer, or Eclipse, workspace that provides the home for the generated Java class.

    The project must exist before running the call stub generator.

    Platform Win32 Optional Target operating system. Supported values include Win32, AIX, and z/OS. The value is case sensitive.
    CodePage ISO-8859-1 Optional Code page of the COBOL data.
    FloatingPointFormat IEEE 754
    Format of floating points. Supported values include IEEE 754 and IBM Hexadecimal.
    ExternalDecimalSign ASCII Optional External decimal sign. Supported values include ASCII, EBCDIC, and EBCDIC Custom.
    Endian Little Optional Endian of the COBOL data. Supported values include Little and Big.
    RemoteEndian Little Optional Remote endian of the COBOL data. Supported values include Little and Big.
    Quote DOUBLE Optional Specifies the quotation format. Supported values include DOUBLE and SINGLE.
    Trunc STD Optional Specifies the way fields are truncated during COBOL move or arithmetic operations. Supported values include STD, BIN, and OPT.
    Nsymbol DBCS Optional Specifies the way the N symbol is used in literals and PICTURE clauses, indicating whether to use national or DBCS processing. Supported values include DBCS and NATIONAL.
    OverwriteExistingClass true Optional Whether the call stub generator overwrites a class with the same name that is already present in the output directory. Supported values include true and false.
    GenerationStyle Default Optional Specifies the generation style. Supported values include Default, Preserve case of names, and Shorten names.
    Verbose false Optional Whether to set the trace level to debug. Supported values include true and false.

  3. Save the configuration file to a location that the Rational Application Developer product can access.


Example

See the following sample csg.properties call stub generator configuration file:

# Configuration file for COBOLCallStubGenerator
#####
# EclipseHome specifies the installation location of Rational Application Developer.
#
EclipseHome=full_path_to_Eclipse_directory
  #####
# Workspace specifies the location of the Rational Application Developer workspace.
# If it does not exist, the COBOLCallStubGenerator creates the workspace.
#
WorkSpace=full_path_to_workspace_directory
  ######
# EclipseProjectName specifies the project in the workspace
# that will receive the generated call stubs and bindings.
#
EclipseProjectName=Eclipse_project_name
 #####
#  The target operating system. The permitted options are: Win32, AIX and z/OS.
#
# PARAMETER - Required # Platform=Win32
Platform=z/OS
 #####
#  The target codepage.
#
# PARAMETER - Required CodePage=IBM1047
 #####
# The floating point format has only two possible values:  #   IEEE 754
#   IBM Hexadecimal
#   The default is IEEE 54
#
# PARAMETER - Required FloatingPointFormat=IBM Hexadecimal
 # PARAMETER - Required ExternalDecimalSign=EBCDIC
 # PARAMETER - Required Endian=Big
 # PARAMETER - Required RemoteEndian=Little
 # PARAMETER - Required Quote=DOUBLE
 # PARAMETER - Required Trunc=STD
 # PARAMETER - Required Nsymbol=DBCS
 #####
# Possible values for overwriteExistingClass are true or false.
#
# PARAMETER - Required OverwriteExistingClass=true
 #####
# Possible values for GenerationStyle are:
#   Default, "Preserve case of names" or "Shorten names"
# Be sure to use quotes for values with space characters in them.
#
# PARAMETER
GenerationStyle=Default
 #####
# Verbose sets the trace level to "debug".
# Values for Verbose are either true or false.  #
# PARAMETER - Optional Verbose=false


What to do next

Run the COBOL call stub generator. We can run the call stub generator from a command line, an Ant task, or the Rational Application Developer graphical interface.

Specify the fully qualified path to the call stub generator configuration file name when running the COBOL call stub generator. For command-line invocations, use the -configFile setting to specify the file name. For Ant and graphical interface invocations, use the configFile attribute in the <csg> task to specify the file name.


Related tasks

  • Generating COBOL call stubs
  • Invoking the call stub generator from a command line
  • Invoking the call stub generator from an Ant task
  • Invoking the call stub generator from a graphical interface