Saving J2C settings in an Ant script

You can save the settings for your J2C Java™ bean and your data binding classes in an Ant file, which you can run separately.

Before you begin

You can find the Save session as Ant script option in two wizards:
  • The Saving Properties page of CICS/IMS Java Binding wizard,
  • The J2C Java Bean Output Properties page of J2C Java bean wizard.
Important: The Save session as Ant script option is not available for MFS-based applications.

About this task

To save the settings of data binding classes or your J2C bean, select Save session as Ant script, on the properties page of the wizard. If you want to save the default settings as well as the custom settings, select Save all settings. This option is useful if you want to generate the values for all the settings when you go through the wizard, like a template for all the properties. If you do not select this, only the options that you modify or enter when you go through the J2C bean wizard are generated.
Note: The Ant script saves information related to J2C bean and data binding bean generation only. The ant file does not save other information; deployment information (resource reference, for example) is not saved in the ant script.

Procedure

  1. Saving J2C settings in CICS/IMS Java Binding wizard.
    1. On the Saving Properties page, select Save session as Ant script.
    2. The File field contains the default file name, which is the name of the <project name>/<interface name>.xml. If you do not want to accept the default file name, you have three options:
      • Type an alternative name in the File field.
      • Click New to select a different parent folder, and specify a different file name.
      • Click Browse to select an existing Ant script file.
    3. Select Save all settings if you want to save the default settings as well as the custom settings. Do not select this if you want to save only the custom settings. Click Finish. If a file already exists, a dialog box will come up. You can either overwrite the file or append the new contents to the file.
    4. To check your Ant file, in the Enterprise Explorer view, expand your project folder, right-click on your Ant (.xml) file, and select Open with > Ant editor.
  2. Saving J2C settings in J2C Bean wizard
    1. In the J2C Java Bean Output Properties page, select Save session as Ant script
    2. The default ant script file will be generated in the current project. The default ant script file name will be J2C Interface name.
    3. The File field contains the default filename, which is <project name?/<J2C Data Binding class name>.xml. If you do not want to accept the default file name, you have three options:
      • Type an alternative name in the File field.
      • Click New to select a different parent folder, and specify a different file name.
      • Click Browse to select an existing Ant script file.
    4. Select Save all settings if you want to save the default settings as well as the custom settings. Do not select this if you want to save the custom settings only. It is recommended that you select Save all settings so that in the future if you want to modify any other settings, you can just edit the ant script directly. Click Finish. If a file already exists, a dialog box will come up. You can either overwrite the file or append the new contents to the file.
    5. To check your Ant file, in Enterprise Explorer view, expand your project folder, right-click on your Ant (.xml) file, select Open with > Ant editor.
      Important: If you are using a COBOL copy book source file for your J2C bean, the generated Ant file records the location only of the main COBOL file. If your main COBOL file in turn refers to other COBOL files, you must add them to the SYSLIB path:
      • Select Window > Preferences > Importer > COBOL > SYSLIB
      • Click Add, and Browseto the location of your COBOL file. Click OK.
      • Click Apply or OK.

Example

Sample J2C Bean Ant file

Creating data binding using an Ant Script contains sample code used to generate a J2C Java interface, J2C Java implementation, and data binding classes, based on the taderc99.cbl COBOL file and importing the ECIResourceAdapter version 6.0.2.


Feedback