views:

423

answers:

3

I've got VBA code that generates a text file with some pretty basic information included. I then upload that file via FTP.

I got a message from the server admin of the IBM mainframe today that my file was in variable blocking (VB) format and their job process uses a fixed blocking (FB) up to a max size of 256.

How is this done? During the file creation? 3rd party tool?

B

A: 

If I rightly remember FB is in multiples of the block sizes, that is just how DASD stores the files on disk, it must fit in that multiple block size, which increases speed and throughput on the Mainframe. If the data file is not within the boundary of multiple block sizes (This has nothing to do with the actual size of the data), the DASD system just access files in blocks of 256 bytes...there will be a host of special fields inserted into the data file to describe the blocking and so on...which will get inserted when transferred to the mainframe and that data gets transferred to magnetic tape backups...

There should be a script available on the Mainframe to convert it using JCL (Job Control Language)..ask the Mainframe administrator to do it for you...

By the way it should be noted that the character set you used in your data file, just be aware that the mainframe uses EBCDIC character set...There are plenty of tools out there that can convert from ASCII data to the format to be readable by the mainframe, just something to bear in mind of...If the data gets converted that could impact the file size...Thought it would be worth mentioning and important!

There is a Unix/Linux utility that can convert the data to a fixed block size using the dd utility, although I do not think it would be the right way to do it...

Here's a useful link that will help you in understanding this. And also here on SO a similar user was asking about MVS/TSO data...

Hope this helps, Best regards, Tom.

tommieb75
Thanks Tom. I thought it was a reference to the line length, but it seems instead to be about the file size? So the file might need to be padded to get to a specific size? How would I describe the JCL to a layperson?
Bazily
A: 

You can use Locsite to set the record format on the host dataset(File). You can find all the list of FTP sub commands in the below user guide

IP User’s Guide and Commands SC31-8780-05

kishore
A: 

Sorry all, I have a feeling I didn't explain this correctly, because I do now have an answer which is rather simple. These 2 commands seemed to have setup the environment correctly for the file to be fb and not vb.

ftp> quote site lr=94
ftp> quote site rec=fb
Bazily
locsite also does the same thing.."Quote" bypasses the FTP and executes the command on the host. You can find all the info in the guide I had mentioned in my answer
kishore