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:
- Create a working folder on your machine such as c:\tutorials.
- Start Enterprise Developer.
- Click File > New > .
- Specify a name for your project such as ims.
- Specify a working folder in the Location field.
This is the folder you defined in step 1 above.
- Uncheck Create directory for solution.
- 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:
- In Solution Explorer, right-click your project and select
Add > New Folder.
- Create the following subfolders in your project:
cbl, dbd, mfs, psb, loadlib, and
system.
- Right-click a subfolder of your project and select
Add > Existing Item.
- Browse to the
%PUBLIC%\Documents\Micro Focus\Enterprise Developer\Samples\Mainframe\IMS\Classic\IVP or
IVP64 (for 64-bit) directory (default location).
- Set
Objects of type filter to
All Files (*.*).
- 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:
- In Solution Explorer, double-click the Properties folder.
- On the COBOL tab, ensure Configuration is set to Active (Debug).
- Ensure Platform target is set to x86.
- Ensure COBOL dialect is set to Enterprise COBOL for z/OS and that Source Format is set to Fixed.
- Set Character set to ASCII.
- Ensure Compile for debugging is checked.
- In the Output path field, type .\loadlib.
- 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.
- In the DBD Build Settings section, check Generate Map for DBD.
- On the Debug tab, select IMS from the drop down list for Active Settings.
- Click File > Save All to save the changes in the project properties.
Build the Project
To build the project:
- Right-click the solution in Solution Explorer and click
Build Solution.
- 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.
- 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.
- Start a COBOL command prompt:
Click
Start > All Programs > Micro Focus Enterprise Developer > Tools > Enterprise Developer Command Prompt, 32-bit.
- 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:
- In Solution Explorer, right-click
DEMO03DD.DBD in your project and click
Database Utilities > Load.
This starts the
Load window for that database.
- 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.
- 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:
- Execute the following from the COBOL command environment starting in
c:\tutorials\ims\loadlib:
MFIMS STAGE1IMP TRANCODE.TXT