Problem:
From time to time, we receive inquiries from customers who are new to the Mainframe Express product to development and maintenance of their mainframe applications about what directives or other changes they may need to make to the product environment for their intended use. Common are those who are maintaining COBOL applications which use CICS and DB2 (UDB). The following provides some guidance for these users.
Resolution:
Changing directives for COBOL programs is, hopefully, a limited thing to do in Mainframe Express (MFE).
We have made our product as host-compatible and ANSI Standard compliant as we can. It's a fine line at times. So maybe we can provide some pointers.
For CICS programs, there are a few things to be aware of:
Storage allocation under Microsoft operating systems doesn't even come close to handling allocation of storage like IBM does on the host. IBM has refined it's allocation for the mainframe. Microsoft, on the other hand, approaches storage allocation from a PC perspective. We say this because on the host MVS recognizes a 4096 byte area as its smallest storage size (one page of storage). So, as that is the minimum storage available, applications are sometimes written with that in mind. With CICS applications, many programs have been written that pass an, essentially, invalid Commarea by allocating less than the page size of 4096. On the PC under Windows, one only gets what one asks for. This means that under MVS if you allocate 10 bytes you actually get 4096. Under Windows, however, if you ask for 10 bytes, you will be allocated 10 bytes. To allow for this difference, it is common for users to have to use the following steps to check your SIT definition for the Commarea override amount. To do this:
"
Go to the MFE Project View window and select the CICS tab along the bottom.
"
Next under CICS System, select the SIT in the left hand pane.
"
In the right hand pane select your SIT. Right click on it and select Properties.
"
Go to the Development tab and there you will find the Commarea override.
Use 4096, since that matches the storage page size of MVS. If your application passes 400 bytes, but it was originally defined as using only 200 bytes in the definition, you won't get caught by the difference (actually anything up to 4096). If your Commarea usage has grown to be larger than 4096, then you will get an abend and you may have to adjust the size based on your application's usage.
Next, by default, there is a flag off for BMS support that many users find they will need. Go to the main menu items along the top of Mainframe Express IDE. Select the Project>Build Settings for Project, BMS tab. Turn on the 'Enable SDF features'. This will allow you to compile all BMS map's properly.
Finally, for most COBOL programs our defaults are okay, but for some you might have to make adjustments to the environment to match your MVS configuration and usage.
"
Turning off the flag for numeric field checking. There are times when MVS gives an application good (ie. matching) 'residual storage' and applications run without an abend (S0C7). However, once they move their application into Mainframe Express they encounter runtime errors. If you suspect that bad, invalid, or uninitialized data is being passed, but your application can't be changed right away to check for this, you will need to reconfigure the handling of numeric field checking within the product. To do this:
Select the Project>Project Settings, Execution tab. De-select the 'Validate the contents of numeric fields' option. By doing this, the product will then pass the data "as is". There are times when you may want this. For the mainframe environment, IBM says that your data should be correct, but the IBM compiler and runtime never check for it. It's up to the programmer to insure the data is correct (and in their view, rightfully so). The Micro Focus approach is to check for these situations, as they can cause a variety of residual problems within the MVS environment, from incorrect data to crashing CICS regions for seemingly unknown reasons.
"
The Mainframe Express default dialect is VS Cobol II. A common mistake is to try using a program that has Intrinsic Functions coded. IBM did not start supporting this until Cobol/370. So, a dialect newer than the VS COBOL II R4 is required to support Intrinsic Functions. Most people either use COBOL II or go to the latest IBM dialect (OS390 for MFE v2.5 and z\\OS COBOL in MFE v3.0).
"
Finally, DB2. A lot of our customers use our HCO Option support to access IBM's DB2/UDB) on the MVS host system instead of using the UDB PC product. Even though both products are from IBM, the PC version product doesn't support all the syntax that the host does. If a customer keeps their SQL databases locally (on their hard drive or on the network), then our SQL Option for DB2 (aka XDB support) covers them nicely. It supports what the host IBM system does and is liked very much by those who use it. Again, our SQL preprocessors (HCO and XDB) will recognize Exec SQL statements and pass what the application should need.
#EnterpriseDeveloper
#MFDS




