Rational Developer for System z

1. Import COBOL files

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:
  1. 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.
    1. Click FileSystem to select a file from the workstation's file system (see Adding a source path to the SYSLIB tab).
    2. Click Workspace to select a file from the current workspace that you are using in the workbench.
    3. Click Remote to select a file on the remote z/OS® system.
      Importing files from a remote z/OS system: Follow these steps:
      1. When you click Remote, the Browse For File window opens.
        1. Expand My Data Sets.
        2. Select either a COBOL source data set member or a copy book data set member.
        3. Click OK.
      2. 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.
      3. If you selected a copy book data set member, then the Generation from copy book window opens.
        1. The window displays a message stating that the selected copy book member is expected to have no dependencies.
        2. 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).
    4. 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:
      1. Converts the COBOL data structure to an equivalent service flow project message data type having the same name (CUSTOMERINFO); and
      2. 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.
  2. In the Project Name list box, select the subproject in which you want the new message files and the operation file (if any) stored.

  3. 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.

  4. Click Next to go to the next page of the wizard or Finish to close the wizard.

If you click Finish:
  1. The wizard converts each COBOL source file listed to a new message file (About the Import COBOL Files wizard).
  2. The wizard closes.

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:

  1. On the main menu of the workbench, select Window > Preferences. The Preferences window opens.

  2. In the Preferences window:
    1. In the left pane, expand Importer > COBOL.
    2. In the right pane:
      1. Select the SYSLIB tab.
      2. On the SYSLIB tab:
        1. Click Add.
        2. 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.)
        3. Click OK.

      The fully qualified path of the location that you selected is displayed in the Location list.

  3. 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.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)