You can import one or more data structure files (COBOL copybooks or PL/I includes) into
your service project. You can also import one or more full COBOL or PL/I programs.
Before you begin
Ensure that the program compiles without errors. Errors reported by IBM® Enterprise COBOL compiler or Enterprise PL/I compiler must be resolved before
you import the file.
To import a COBOL copybook that contains a COPY REPLACING BY statement, you must configure
SYSLIB in the importer preferences to search all folders that contain dependencies. You must also
import the full program with the REPLACING statement.
In the service interface
editor, click
Import data structure.
If you select a COMMAREA, container, segment, IBM MQ
message, or any of the rows below it before you click Import data structure, the wizard automatically
populates the specified COMMAREA, container, segment, or IBM
MQ message as the target.
If the data structure has changed for an existing request or response service interface, you
can re-import the data structure file by clicking Import data structure. Existing custom data
structure names (aliases) and remarks are preserved if the 01 level structure remains unchanged.
Specify the location to import the data structures or a full program from, and specify the file
type.
Click Browse to select the data structure file that contains the COBOL
copybooks or PL/I includes to import.
Tip: If you are importing an application source file that references a COPY or INCLUDE
file, import from a local file system with both the application source file and the referenced file
in the same directory.
If you import the data structures from z/OS, the data
structure file does not have a file extension. It takes the file type that is specified in 2.
If you import the data structures from a local file system, a file with one of the following
extensions takes that file type as default:
A COBOL copybook can have any of the following file name extensions: .cbl, .ccp, .cpy, or .cob.
A PL/I include can have any of the following file name extensions: .pli, .inc, or .mac.
If the file extension is incorrect for the type of file type that the file is, either change
the file extension or click Window > Preferences > Importer, and then select either COBOL or PL/I from the list on the left. Then, edit the type
of file that is indicated by each file extension.
If the data structure file does not have a
file extension, it takes the file type that is specified in 2.
Select the data structure name and the associated container or segment to import the data
structure into.
Click Add to Import List.
The selected data structure is added to data structure table.Figure 1. Import dialog for an IMS service
Repeat steps 3 through 5 for each data structure that you want to
import.
Click Finish to import the data structure.
If you are updating an existing data structure, a dialog opens. Click
Yes to replace the existing data structure and preserve your aliases and
remarks. Click No to add the data structure as a new, separate data
structure.
Tip:
For each additional container or segment, select a channel or message node and click
Add. Repeat the steps from step 3 for each data structure that you want to
import. For more information and restrictions, see Customizing the service interface.
When importing multiple copybooks, the start byte for each copybook is relative to the
root data structure. In many cases, the value shown is 1. If your data structure utilizes OCCURS
DEPENDING ON or REFER clauses, no start positions are indicated for start byte fields.
For more tips about potential issues and how to resolve them, see the following topics: