Problem:
Customer is running the Accessing Mainframe Files Sample Session in MFE 3.0:
I was able to run the JCL. It completed with a COND CODE 0000. That was good, but the next step in the tutorial says to run it again with the catalog entry removed for the host dataset. Now whenever I run the JCL it errors out with a 139 on record length or Key data inconsistency on
OPEN INPUT INQUIRY
Resolution:
The record length in the COBOL program is 535 bytes, so the LRECL should be 535 4 bytes = 539. The printed material is 534 and the online doc is only 539 in one place (and 534 in another). If you redo the project with an LRECL of 539 instead of 534 then everything should play both ways.
So, when you created the mainframe dataset (in the Uploading and Downloading files chapter) here's what's in the doc:
To create a sequential data set:
Click Sequential dataset on the Allocate menu.
A dialog box appears for you to define the data set you want to create.
Enter the following (leave the remaining fields unchanged): Dataset
name: my-datasets.VSAMDEMO.INQUIRY.DATA
Quantity: 1
Type: VB
Logical record length: 534
Then when you added input files to the catalog (in the Accessing Mainframe Files chapter) it says the following:
Adding Input Files to the Catalog
We now need to add the data files to the project's catalog. First we'll add the data file held on the mainframe, my-datasets.VSAMDEMO.INQUIRY.DATA, then we'll add the other two files, which are on the PC.
Click the Catalog tab at the bottom of the project window.
Right-click on the Catalog View, and on the popup menu click Add Existing Dataset.
On the dialog box, enter my-datasets.VSAMDEMO.INQUIRY.DATA in the DS Name (data set name) field.
Enter the value $$node-name\\my-datasets.VSAMDEMO.INQUIRY.DATA in the PC Filename field, where node-name is the name that you defined in the Server Access Configuration dialog box in the section Specifying the Communications Link.
For example, if node-name is MVS-PROD, and my-datasets is MF101.MTS, enter $$MVS-PROD\\MF101.MTS.VSAMDEMO.INQUIRY.DATA in this field.
For a mainframe dataset, you can't use the Browse button to set the PC Filename field. You must type the name.
Leave the default PS in the DSORG (organization) field.
Change the RECFM (record format) field to VB.
Change the LRECL (record length) field to 539.
Both should say 539.
Drop the mainframe file and recreate as 539 and it should work for you.
#MFDS
#EnterpriseDeveloper