Previous Topic Next topic Print topic


Creating and Building an IMS Application

These are the steps to create anEnterprise 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 anenterprise 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. Create a working folder on your machine such as c:\tutorials.
  2. Start Enterprise Developer.
  3. Click File > New > Project > Templates > COBOL > Native > Mainframe Subsystem Application.
  4. Specify a name for your project such as ims.
  5. Specify a working folder in the Location field.

    This is the folder you defined in step 1 above.

  6. Uncheck Create directory for solution.
  7. Click OK.

    This creates an ims folder in your working folder that holds your solution and project.

Import the Files from the Demonstration Program

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

  1. In Solution Explorer, right-click your project and select Add > New Folder.
  2. Create the following subfolders in your project: cbl, dbd, mfs, psb, loadlib, and system.
  3. Right-click a subfolder of your project and select Add > Existing Item.
  4. Browse to the %PUBLIC%\Documents\Micro Focus\Enterprise Developer\Samples\Mainframe\IMS\Classic\IVP or IVP64 (for 64-bit) directory (default location).
  5. Set Objects of type filter to All Files (*.*).
  6. Select the files to add and click Add.
    Add the following demonstration files to the subfolders of your project as detailed in the table below:
    Folder name File Comments
    cbl DEMO001T.CBL

    RGHTJUST.CBL

     
    dbd DEMO03DD.DBD  
    loadlib TRANCODE.TXT

    DEMO03DD.DBU

    Contains the data files and will contain the executables required at runtime.
    mfs DEMO90.MFS

    DEMO91.MFS

    DEMO92.MFS

     
    psb DEMO001T.PSB  
    system   Will contain system files such as the CICS resource definitions files, dfhdrdat.*.

    This creates copies of the files in the respective subfolders of your project.

Specify Project Properties

To specify properties for your project:

  1. In Solution Explorer, double-click the Properties folder.
  2. On the COBOL tab, ensure Configuration is set to Active (Debug).
  3. Ensure Platform target is set to x86.
  4. Ensure COBOL dialect is set to Enterprise COBOL for z/OS and that Source Format is set to Fixed.
  5. Set Character set to ASCII.
  6. Ensure Compile for debugging is checked.
  7. In the Output path field, type .\loadlib.
  8. On the IMS tab, type .\loadlib in the Generated file path, MFS output path, Database path, and Configuration file path fields.

    This redirects the output from generation of the IMS files into the loadlib subfolder of the project.

  9. In the DBD Build Settings section, check Generate Map for DBD.
  10. On the Debug tab, select IMS from the drop down list for Active Settings.
  11. Click File > Save All to save the changes in the project properties.

Build the Project

To build the project:

  1. Right-click the solution in Solution Explorer and click Build Solution.
  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.

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 Solution Explorer, right-click DEMO03DD.DBD in your project and click Database Utilities > Load.

    This starts the Load window for that database.

  2. Use the browse button for the Input data set name field to navigate to and select the DEMO03DD.DBU file in your project, then click Open.
  3. Click Execute to initialize the database and load it from the DEMO03DD.DBU input file.

    View the Output pane for confirmation of the load.

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
Previous Topic Next topic Print topic