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:
- Start Enterprise Developer.
- Click File > New > Project... > Micro Focus COBOL > Mainframe COBOL Project.
- Specify a name for your project such as ims.
- Click Finish.
This creates a c:\tutorials\ims folder that holds your project.
-
Make sure that the Team Developer perspective is the active Eclipse perspective and the Enterprise Development Projects application is loaded in the Team Developer perspective, then right-click the ims project and selectNew > Folder > Folder....
- Type loadlib in the Folder name field, and click Finish.
- 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:
- In the Team Developer Tree view, select your project and then select
File > Import... > General > File System.
- Click
Next.
- Browse to the
%PUBLIC%\Documents\Micro Focus\Enterprise Developer\Samples\Mainframe\IMS\Classic\IVP or
IVP64 (for 64-bit) directory (default location).
- 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.
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.
- In the Team Developer Tree view, right-click the
TRANCODE.TXT file, select
Move and then select the
loadlib subfolder and press
OK.
Specify Project Properties
To specify properties for your project:
- In the Team Developer Tree view, right-click the project, select Properties, and expand Micro Focus.
- In Build Configurations > COBOL, set the following, then click Apply:
- In , 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.)
- In the Project Settings > IMS settings, enter the path to the loadlib folder in the Generated Filesand 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.
- 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.)
- In Project Settings > IMS > MFS Settings section, enter the path to the loadlib folder in the MFS Output field. Click Apply.
- Click OK to save the changes in the project properties.
Build the Project
To build the project:
- 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:
- Click
Project > Clean.
- Click
Clean projects selected below.
- Select your project; then click
OK.
- 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.
- 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.
- 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 the Team Developer Tree view, right-click
DEMO03DD.DBD in your project, and click
Database Utilities > Load....
This starts the
Load window for that database.
- Specify
DEMO03DD.DBU in the
Input/Output file name field.
- 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:
- Execute the following from the COBOL command environment starting in
c:\tutorials\ims\loadlib:
MFIMS STAGE1IMP TRANCODE.TXT