Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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.

Comment on Net::FTP to Mainframe Z/OS
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?
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.


    sas
      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).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2014-07-12 03:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (238 votes), past polls