Creating and Building an IMS Application

These are the steps to create an Enterprise Developer project comprising all the parts of your IMS application, such as the COBOL source and the IMS files.

You build the demonstration application in Enterprise Developer, deploy and run it on an enterprise server instance configured for IMS support, and debug it dynamically.

Create a Project

To create a native COBOL project to hold the files from the demonstration program:

  1. Start Enterprise Developer.
  2. Click File > New > Mainframe COBOL Project.
  3. Specify a name for your project such as ims.
  4. Uncheck Use default location.
  5. Specify c:\tutorials\ims in the Location field.
  6. Click Finish.

    This creates a c:\tutorials\ims folder that holds your project.

  7. In COBOL Explorer, right-click the project, and click New > Folder.
  8. Type loadlib in the Folder name field, and click Finish.
  9. Create a system subfolder of the project in the same way.

Import the Files from the Demonstration Program

To import the files from the demonstration program into your project:

  1. In COBOL Explorer, right-click your project and click Import > Import > General > File System.
  2. Click Next.
  3. Browse to the %PUBLIC%\Documents\Micro Focus\Enterprise Developer\Samples\Mainframe\IMS\Classic\IVP or IVP64 (for 64-bit) directory (default location).
  4. Select the following files to add and click Finish.
    • DEMO001T.CBL
    • DEMO001T.PSB
    • DEMO03DD.DBD
    • DEMO03DD.DBU
    • DEMO90.MFS
    • DEMO91.MFS
    • DEMO92.MFS
    • RGHTJUST.CBL
    • TRANCODE.TXT

    This creates copies of the files in the project directory. In COBOL Explorer, they are shown grouped in virtual folders for the different file types.

    As by default Eclipse is configured to build the project automatically, adding the files triggers a build and the build output files are created in the project directory.

  5. In COBOL Explorer, using drag and drop, move the TRANCODE.TXT file from the project directory to the loadlib subfolder.

Specify Project Properties

To specify properties for your project:

  1. In COBOL Explorer, right-click the project, select Properties, and expand Micro Focus.
  2. In Build Configurations > COBOL, set the following, then click Apply:
    • In the Output path field, click Browse and choose the loadlib subfolder in the project directory.
    • Set Platform target to 32 bit.

      If you are using the sample files from the IVP64 folder, you need to set Platform target to 64 bit.

  3. In Project Settings > COBOL, set the following, then click Apply:
    • Character set to ASCII
    • Compile for debugging
    • Language dialect to Enterprise COBOL for z/OS
    • Source Format to Fixed

    (If you receive a message suggesting that some user files need to be deleted, click No.)

  4. In the Project Settings > IMS settings, enter the path to the loadlib folder in the Generated Files and IMS Databases fields, then click Apply.
    Note: The Generated Files setting is relative to the current project, but the IMS Databases setting must be an absolute path.
  5. In Project Settings > IMS > DBD Settings section, check Generate Map for DBD. Click Apply. (If you receive a message suggesting that some user files need to be deleted, click No.)
  6. In Project Settings > IMS > MFS Settings section, enter the path to the loadlib folder in the MFS Output field. Click Apply.
  7. Click OK to save the changes in the project properties.

Build the Project

To build the project:

  1. Eclipse might be configured to automatically build projects when changes occur, but at this time you need to perform a clean build. To do this:
    1. Click Project > Clean.
    2. Click Clean projects selected below.
    3. Select your project; then click OK.
  2. Check your project directory to see the different executables and other system files produced by the build such as:
    C:\tutorials\ims\loadlib folder:
    • DBDGEN2.DAT
    • DBDGEN2F.DAT
    • PSBGEN3.DAT
    • DEMO001T.ACB
    • DEMO03DD.ACB
    • The MFS files generation creates some .mid, .mod, .dif and .dof files. These files contain system configuration data. You should move them only if you know how to configure your enterprise server.
    • Building the DBD and the PSB files produces respectively dbdgen2.dat, dbdgen2f.dat, psbgen3.dat as well as some .acb files.
  3. Copy the DEMO0*.* files from the project directory to the loadlib subfolder.

Update the Resource Definition File

IMS support includes two transactions, /CIC and /IMS, that you use to switch the terminal session for the enterprise server to CICS or IMS subsystem respectively. In order for these new transactions to be available you need to update your resource definition file using the caspcupg command.

  1. Using Windows Explorer, copy the dfhdrdat file from the %ProgramFiles(x86)%\Micro Focus\Enterprise Developer\etc\cas (default location) to the system subfolder in your project directory.

    It is a good practice to create copies of the product dfhdrdat file for your project rather than using the files that are in the installation of this COBOL development system.

  2. Start a COBOL command prompt:

    Click Start > All Programs > Micro Focus Enterprise Developer > Tools > Enterprise Developer Command Prompt, 32-bit.

  3. Type the following at the command line:
    caspcupg /dp=C:\tutorials\ims\system

    The DP parameter specifies the path to the system subfolder in which you copied the resource definition files.

Load the IMS Database

To load the IMS database:

  1. In COBOL Explorer, in the DBD Files folder, right-click DEMO03DD.DBD in your project, and click Database Utilities > Load.

    This starts the Load window for that database.

  2. Specify DEMO03DD.DBU in the Input/Output file name field.
  3. Click OK to initialize the database and load it from the DEMO03DD.DBU input file.

Set Up a List of IMS Transactions

To set up the list of IMS transactions for the IMS configured enterprise server:

  1. Execute the following from the COBOL command environment starting in c:\tutorials\ims\loadlib:
    MFIMS STAGE1IMP TRANCODE.TXT