Selecting variables from imported source code

You can select variable definitions from imported source code when adding information sources and application data in a capture specification.

About this task

You can import your variable definition from COBOL, C, C++, or PL/I source code containing a data definition.

Procedure

  1. Click Select from imported language structure. The Choose Source Code window opens.
    An image of the Specify Source Structure dialog.
  2. Click Choose a language structure file and navigate to your source code file, then click OK. If your source file uses one of the following extensions the source language is set automatically:
    Source language File extension
    C *.c or *.h
    C++ *.cpp or *.hpp
    COBOL *.cbl, *.cob, *.ccp, or*cpy
    PL/I *.pli, *.mac, or *.inc

    If the file does not have one of the extensions shown you must select the source language. You can also override the source language chosen for you if required.

    For C and C++ you can supply the name of the structure to be imported. This defaults to DFHDATA or the last structure name used.

    After the editor has loaded the language structure, it displays any errors and warnings discovered in the language structure. These DFHPI-prefixed messages are documented as CICS messages and are shared with the CICS Web services assistant and the CICS XML assistant. If errors occur, the language structure cannot be used and the editor returns to the previous panel. If warnings occur, they are displayed. Click OK.

    If there are no errors, the Language Structure window is displayed.

    An image of the Obtain data format from imported language structure dialog.
    This window contains a tree showing the language structure. Items are indented in the tree if they are contained by a parent item. Each item has a format, offset, and length. The precision is shown for numeric and scientific items.

  3. Click the data item that you want to import in the displayed tree of data items. If the data type is floating point and the language is not COBOL, the Choose Floating Point Type Used window is displayed.
    An image of the choose floating point type dialog.

    Compiler options determine the floating point type used and if the wrong type is used in the CICS event binding editor then incorrect values can be produced for the event.

    Note: The Choose Floating Point Type Used window is not displayed for COBOL because only hexadecimal floating point is valid for COBOL.
  4. Optional: Select one of the floating point choices (Binary Floating Point, Decimal Floating Point, or Hexadecimal Floating Point) and click OK.
  5. Click OK. The format information is filled in from the imported data item in the Information Source or Variable Data Value window.

Results

You have imported a variable data value. The next time you click Select from imported language structure, the last language structure that you specified displays automatically. If you want to import a value from a different language structure, you can click Change language structure in the Language Structure window to select another language structure.