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
- Click Select from imported language structure. The Choose Source Code window opens.
- 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.
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.
- 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.
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.
- Optional: Select one of the floating
point choices (Binary Floating Point, Decimal
Floating Point, or Hexadecimal Floating Point)
and click OK.
- 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.