Create and Configure a Solution and Project

Complete the steps required to create an Enterprise Developer solution and project, import the MFDEMO IMS application into the project, set the project properties, build the application, and perform additional required steps to enable the application to run in Enterprise Server.

Create the solution and project

  1. Create a working directory on your machine.

    In this tutorial, we use c:\tutorials. If you have chosen to use an alternative working directory, remember to substitute it when the instructions specify c:\tutorials.

  2. In Visual Studio, click File > New > Project.
  3. In the Create a new project dialog box, select COBOL from the Language drop-down list.
  4. In the center pane, select Mainframe Subsystem Application.
  5. Click Next.
  6. In the name field, type the name of the project: IMSTutorial.
  7. Specify your working directory, c:\tutorials, in the Location field.
  8. Uncheck Place solution and project in the same directory.
  9. Click Create.

    In Enterprise Developer, this creates a solution named IMSTutorial that contains one project, also named IMSTutorial.

    On disk, this creates an IMSTutorial subdirectory to your working directory. The IMSTutorial subdirectory contains the IMSTutorial.sln Visual Studio solution file. In addition, this action creates an IMSTutorial\IMSTutorial subdirectory. This is the project directory.

Add demonstration application files

  1. In Solution Explorer, right-click the project and then use Add > New Folder to add each of these subfolders to the project:
    • cbl
    • dbd
    • mfs
    • psb
    • loadlib
    • system

    This adds the project subfolders to the Solution Explorer, and creates project subdirectories on disk.

    Use the following table to help you determine which demonstration files to add to which subfolder.

    Subfolder name Files to add Comments
    cbl DEMO001T.CBL

    RGHTJUST.CBL

     
    dbd DEMO03DD.DBD  
    loadlib TRANCODE.TXT

    DEMO03DD.DBU

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

    DEMO91.MFS

    DEMO92.MFS

     
    psb DEMO001T.PSB  
    system None Eventually contains system files such as the resource definitions file, dfhdrdat.
  2. In Solution Explorer, right-click a subfolder of your project and select Add > Existing Item.
  3. Browse to the %PUBLIC%\Documents\Micro Focus\Enterprise Developer\Samples\Mainframe\IMS\Classic\IVP or IVP64 (for 64-bit) directory (default location).
  4. Optionally set the Objects of type filter to show only the type of files you want to add.
  5. Select the appropriate files; then click Add.
  6. Repeat steps 3 through 6 to add all appropriate demo files.

    This adds the files to the project and creates copies of the files in the respective subdirectories of your project.

Set project properties

  1. In Solution Explorer, double-click your project's Properties folder.

    The Properties page lists a series of tabs on the left side.

  2. On the COBOL tab, set Configuration to Active (Debug).
  3. Set Platform target to Active (x86).
  4. Set COBOL dialect to Enterprise COBOL for z/OS.
  5. Set the Character set to ASCII.
  6. Set Source Format to Fixed.
  7. Check Compile for debugging.
  8. In the Output path field, type the path to the loadlib subfolder of your project. Because the current directory is the project directory, this can be expressed as .\loadlib.
  9. On the IMS tab, type .\loadlib into the Generated file path, MFS output path, Database path, and Configuration file path fields.

    This directs the output for all generated IMS files into the loadlib project directory.

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

Build the project

  1. In the Solution Explorer, right-click the project; then select Build from the context menu.
  2. Check your project directory to see the different executables and other files produced by the build such as those in the project's loadlib directory. For example:
    • 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.