Q

FTP a dataset from MVS to Linux

CICS expert Robert Crawford offers some code to help with an MVS to Linux FTP.

I am trying to FTP a dataset (in binary mode) from MVS to Linux which has RECFM=VB and LRECL=32756 and BLKSIZE=327560. I know, in MVS dataset there must be some bytes for BDW/RDW which tells the size of the record in dataset. After FTP when I read the dataset, the BDW/RDW bytes are removed from the dataset and now, it becomes difficult to read the dataset. Please suggest some ways, by which I can read these BDW/RDW bytes in Linux.
First, the BLKSIZE can't be 327560 (is this a typo)? The maximum is 32K (32760) for DASD and even on tape using the "new" Large BLKSIZE Interface (LBI) support the maximum is 256K (for 3590). I'll assume you meant 32760.

It might be easiest to convert the file to FB with LRECL=32756 prior to the FTP. A simple REXX program could be used. For example:

/* REXX */
"ALLOC FI(VBIN)  DA('my.file.VB') SHR REUSE"
"ALLOC FI(FBOUT) DA('my.file.FB') SHR REUSE"
"EXECIO  *  DISKR VBIN (FINIS"
queue ''
"EXECIO * DISKW FBOUT (FINIS"
"FREE  FI(VBIN)"
"FREE  FI(FBOUT)"
Exit 0

If you run this in batch you can allocate the files in JCL and don't need the ALLOC / FREE in the program.

This was first published in March 2007

Dig deeper on Mainframe operating systems and management

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWindowsServer

SearchEnterpriseLinux

SearchServerVirtualization

SearchCloudComputing

Close