Skip to main content

Problem:

We have compiled VRECGEN on our mainframe. The dataset we want to download has DCB=(RECFM=VB,LRECL=12000). VRECGEN fails on the OPEN of the input file. The host says the input dataset is 12000 and the program uses 32000. Can you help please?

Resolution:

VRECGEN defaults to use 'Occurs 0 to 32700 Times' in the input FD.  Change that to be '0 to 12000'. Then change the output FD to be the same. But the key will be the JCL that will be  

   DSORG=PS,RECFM=VB,LRECL=12004,BLKSIZE=0  

          or you can use BLKSIZE=12008

I like BLKSIZE=0 because the system determines the optimum blocking based on the dasd used.

The output file will be:  

   DSORG=PS,RECFM=VB,LRECL=12006,BLKSIZE=0   

         or you can use BLKSIZE=12010  

  

The default setting in VRECGEN for the output file is set from 2 to 32702 in the COBOL FD, so one would use a DCB of:  

  DCB=(RECFM=VB,LRECL=32706,BLKSIZE=32710)  

The output file's LRECL (logical record length) is the input file's MVS dataset definition (32700) plus 4 bytes for the RDW plus 2 bytes (added to the output file by VRECGEN). The BLKSIZE needs to be at least LRECL 4 (for the z/OS system BDW). Avoid the math and use BLKSIZE=0.

This implies making a separate copy or modification of VRECGEN for different length datasets to be downloaded. In that case, you can use the maximum and then let MFA Drag & Drop create a PC file using the maximum record length it found. Of course, that takes up dasd space on the host, but just delete the datasets after you have a good copy on the PC.

So the input JCL override could be:

  DCB=(RECFM=VB,LRECL=32704,BLKSIZE=32708   or 0)  

and the output would be:

  DCB=(RECFM=VB,LRECL=32706,BLKSIZE=32710  or 0)

Once the dataset has been processed by VRECGEN, you can download it via MFA Drag & Drop or if it is not available, use FTP to download, then use DFCONV to convert the file into a into a Variable Length PC format.

Old KB# 3113

#EnterpriseDeveloper
#MFDS