The first page of the Import COBOL file wizard, titled Import
COBOL Files, allows you to specify the COBOL files that
contain the data structures that you want to convert to service flow
project messages, and also allows you to specify the subproject in
which you want to store the new message files and (optionally) the
new or modified operations file.
This topic contains the following subtopics:
Instructions for using this page
of the wizard
To use this page of the wizard:
In the
COBOL files to import list box,
list the COBOL files that contain the structures that you want to
convert to service flow project messages.
- Click FileSystem to select a file from
the workstation's file system (see Adding a source path to the SYSLIB tab).
- Click Workspace to select a file from the
current workspace that you are using in the workbench.
- Click Remote to select a
file on the remote z/OS® system.
Importing files from a remote z/OS system: Follow these steps:
- When you click Remote, the Browse
For File window opens.
- Expand My Data Sets.
- Select either a COBOL source data set member or a copy book data
set member.
- Click OK.
- If you selected a COBOL source data set member, then the Check
Dependencies? window opens.
- Select one of the following options:
- Import the selected source only
- Select this option if you want to import only the selected COBOL
data set member.
- Import the selected source and any dependent files
- Select this option if you want to import not only the selected
COBOL data set member but also all copy book data set members on which
the selected COBOL data set member has dependencies.
- Click OK.
- If you selected a copy book data set member, then the Generation
from copy book window opens.
- The window displays a message stating that the selected copy book
member is expected to have no dependencies.
- Click OK.
Important: Before you can import
COBOL files from a remote z/OS system,
you need to configure the Remote Systems view to detect and process
the COBOL source files and any dependent copy book files that you
want to import (see
Importing COBOL files from a remote z/OS system).
- Click Remove to remove a file from the
list.
Note: - The wizard allows you to select only those files that have one
of the following extensions: .cbl, .ccp, .cob,
or .cpy. If your COBOL source file has a different
extension then you must change it to one of these extensions before
you can select it in the wizard.
- The wizard converts each COBOL source file that you select (for
example, queryAccount.cbl) to a new message file having the same name
but with the extension .sfmxsd (such as queryAccount.sfmxsd).
- Within each new message file, for each original COBOL data structure
(for example, a data structure named CUSTOMERINFO) the wizard:
- Converts the COBOL data structure to an equivalent service flow
project message data type having the same name (CUSTOMERINFO);
and
- Creates a new message based on the new data type and named msg_datatype (msg_CUSTOMERINFO).
- It is not a limitation that all the new messages created from
a single COBOL source file are stored within a single message file:
- A message in a message file is not itself used for data storage,
but rather is a pattern for an actual data area that is created and
used for data storage when a flow is played back or when a generated
macro or service flow is performed.
- You can create a reference (consisting of a message file name
and a message name) to a message from any operation in the same
subproject as the message file, and you can have multiple references
to the same message.
To import composite COBOL files on Linux systems,
observe the following practices:

In the Project Name list box, select
the subproject in which you want the new message files and the operation
file (if any) stored.
Select the list box Overwrite existing resources
without warning if you want the wizard to overwrite existing
message files or an existing operation file without prompting you.
Click Next to go to the next page of
the wizard or Finish to close the wizard.
Adding a source path to
the SYSLIB tab
When a COBOL source file is on the workstation's
file system, and the COBOL source file includes copy book files, then
in some situations the wizard that browses the file system can fail
to find the included copy book files, even if they are in the same
directory as the COBOL source file that includes them.
To solve
this problem, add the path of directory in which the copy book files
are located to the SYSLIB tab in the COBOL
importer preferences, before you invoke the Import COBOL Files wizard.
To
add the path of the directory to the SYSLIB tab:
- On the main menu of the workbench, select . The Preferences
window opens.
In the Preferences window:
- In the left pane, expand .
- In the right pane:
- Select the SYSLIB tab.
- On the SYSLIB tab:
- Click Add.
- Browse to the directory on the file system where the copy book
files are located. (This can be the same directory in which the COBOL
source file that includes the copy book files is located.)
- Click OK.
The fully qualified path of the location that you selected
is displayed in the Location list.
Click OK. The Preferences window closes.
When you run the Import COBOL Files wizard, select File
System, and browse to the directory where the COBOL file
is located, then the wizard that browses the file system still displays
only the COBOL file, even if the included copy book files are located
in the same directory.
However, when you select the COBOL file
and click OK, then the wizard that browses
the file system locates the copy book files (using the path that you
added to the SYSLIB tab) and passes the location
information back to the Import COBOL Files wizard.
Like the
wizard that browses the file system, the first page of the Import
COBOL Files wizard displays only the COBOL file, without displaying
any included copy book files. However, the Import COBOL Files wizard
does know the location of the copy book files. On the second page
of the Import COBOL Files wizard, when you click the Select button
to select a data structure for Input, Output, or Fault data, then
the wizard lists not only the structures contained in the COBOL file
but also the structures contained in the included copy book files.