If you want to specify a hex pad character, then you need to specify: pad=0x40 The default pad character is a space in the source codepage (0x40 for EBCDIC).
See: http://dovetail.com/docs/sftp/options.html#options_general I'm not sure why you are having a problem... do you have a file name pattern rule in your profile that is overriding these options? Here is an example of sending a text file to windows, preserving trailing spaces and using crlf terminators: cozsftp> lzopts mode=text,notrim,linerule=crlf cozsftp> put //TCPIP.ETC.SERVICES foo.bar (file on server) 0000000: 2320 2020 2020 2020 2020 2020 2020 2020 # 0000010: 2020 2020 2020 2020 2020 2020 2020 2020 0000020: 2020 2020 2020 2020 2020 2020 2020 2020 0000030: 2020 2020 2020 2020 2020 2020 2020 2020 0000040: 2020 2020 2020 2020 2020 2020 2020 2020 0000050: 0d0a 2320 7376 7473 6320 6368 6720 7465 ..# svtsc chg te 0000060: 6c6e 6574 206f 6e20 706f 7274 2032 3320 lnet on port 23 0000070: 746f 206f 7465 6c6e 6574 206f 6e20 706f to otelnet on po 0000080: 7274 2032 3320 2020 2020 2020 2020 2020 rt 23 0000090: 2020 2020 2020 2020 2020 2020 2020 2020 ... Kirk Wolf Dovetailed Technologies http://dovetail.com PS> Please consider using our Co:Z SFTP community forum <http://dovetail.com/support.html#forum> for questions if you are using the free Community License. (Co:Z Enterprise License and Support customers should open a ticket.) On Fri, May 30, 2014 at 10:59 AM, Dazzo, Matt <mda...@pch.com> wrote: > We are using cozbatch for sftp of a text file from the mainframe(client) > to a windows sftp server. The spaces(hex 40) at the end of the file are > getting dropped. I thought using the option NOtrim would have kept the > spaces at the end of the record. Any help is appreciated, thanks. > > I also tried to use the pad option but could not get the format correct. > cozsftp> lzopts mode=text,pad=40 > mode=text ?pad=40 > > cozsftp> lzopts mode=text,pad(40) > mode=text ?pad(40) > > > > CD CS_Letters/OSLOS > lzopts mode=text,NOtrim > PUT //P.PNPAAW20.NPAA15.NPDO001 mdazzo_junk.txt > QUIT > > > cozsftp> lzopts mode=binary,servercp=ISO8859-1,mount > mode=binary mount servercp=ISO8859-1 > cozsftp> CD CS_Letters/OSLOS > cozsftp> lzopts mode=text,NOtrim > mode=text NOtrim > cozsftp> lzopts -a > clientcp=IBM-1047 conddisp=catlg estsize jeslrecl=80 > jesowner=ST1MAT jesrecfm=f jesstatus=* loglevel=I > mode=text mount replace > servercp=ISO8859-1 > smf NOblksize NObufno NOcopies > NOdataclas NOdest NOdir NOdisp > NOdsntype NOdsorg NOforms NOgdgnt > NOhold NOjesblksize NOjesincsysin NOjesjobname > NOjesjobwait NOlabel NOlike NOlinerule > NOlrecl NOmaxcscnt NOmaxdsndirlevels NOmaxvol > NOmgmtclas NOnorecall NOoutdes NOoverflow > NOpad NOrecfm NOrelease NOreqexits > NOreset NOretpd NOsequence NOshowall > NOspace NOspin NOstorclas NOsysout > NOtechnique NOtrim NOtrtab NOtrtch > NOucount NOunit NOunixls NOvol > NOwriter > cozsftp> PUT //P.PNPAAW20.NPAA15.NPDO001 mdazzo_junk.txt > Uploading //P.PNPAAW20.NPAA15.NPDO001 to /CS_Letters/OSLOS/mdazzo_junk.txt > cozsftp> QUIT > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN