Why can't you use OCOPY to copy the file instead of cp?

                                                                 
   o   For an MVS data set in fixed record format:  Any line            
       longer than the record size is truncated.  If the line is        
       shorter than the record size, the record is padded with          
       blanks.                                                          
                                                                        
   o   For an MVS data set in variable record format:  Any line         
       longer than the largest record size is truncated and the         
       record length is set accordingly.  A change in the record        
       length also occurs if the line is short.                         
                                                                        

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Bob Rutledge
Sent: Tuesday, April 07, 2015 3:50 PM
To: [email protected]
Subject: Re: CP to a fixed length output file

On 4/7/2015 12:32 PM, Dana Mitchell wrote:
> I'm working with developers to convert FTP jobs to use secure FTP.  The first 
> step is to cp the MVS dataset to a USS directory so sftp can transfer it.  
> They noticed when transferring an FB 80 file that trailing blanks have been 
> stripped off.  Is there some combination of cp options that would keep 
> trailing blanks intact?  I've tried -B,  -F crlf   etc to no avail.

I don't think cp is going to work out for you.  From a usage note at the end of 
the its man page, it sayeth:

  For MVS to UNIX:

  3.  For an MVS data set in variable record format RECFM(VB) or undefined
      record format RECFM(U), trailing blanks are preserved when copying
      from MVS to UNIX. For an MVS data set in fixed record format, trailing
      blanks are not preserved when copying from MVS to UNIX.

Bob

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to