Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Net::FTP to Mainframe Z/OS

by jazzycat (Initiate)
on Jun 10, 2008 at 13:46 UTC ( #691235=perlquestion: print w/replies, xml ) Need Help??

jazzycat has asked for the wisdom of the Perl Monks concerning the following question:

I created a script using Net::FTP to send from Windows to a Z/OS PDS member. It works, as in no errors, but it truncates the last character on many lines of the file being transferred. Any suggestions? I am transferring as ASCII type, also tried Binary type but that does not work.

Replies are listed 'Best First'.
Re: Net::FTP to Mainframe Z/OS
by sasdrtx (Friar) on Jun 10, 2008 at 14:36 UTC
    Another thing to check is the LRECL of the z/OS dataset. Any record longer will be truncated to that length. However, it seems somewhat unlikely that the records are just one byte too long.

    I'd try using ftp with the same data and compare results.

      The LRECL is 80 - it is a member in a PDS. I think it has to do with incorrect CR LF translation. It truncates apparently randomly. For example a Line that is 3 char long and says RUN become RU after transfer.
        LRECL may not be the only thing, you might want to check the Block size and record format (may not make a difference). I'm assuming you are issuing a SITE command to set the Record Length, Block Size, Record Format as well as Unit (not quite sure what this is or does). Also you might need to issue another SITE command for "trail" (not sure what this does exactly. This is based on some code I have to send files to a mainframe (not sure if it is a Z/OS or what - the code is based on something the mainframe guys gave me so I could FTP to them without having data being truncated).
Re: Net::FTP to Mainframe Z/OS
by monarch (Priest) on Jun 10, 2008 at 14:14 UTC
      It is not UNIX formatted. It is WebFocus code in a text file from Windows. Is there a version of NET FTP that does not use Chomp?

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://691235]
Approved by Corion
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2023-12-04 03:40 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (21 votes). Check out past polls.