Two x'0a' at end of line

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
vasanthz
Posts: 10
Joined: Thu Aug 03, 2017 4:34 pm

Two x'0a' at end of line

Post by vasanthz »

Hi,

I am learning to use CO:SFTP.

Using it I am trying to send a PS file as text to a NAS server.
Below are the control cards.

Code: Select all

server="NAS"                                         
remoteuser="USERID"                             
export PASSWD_DSN='//PASSWORD DSN'              
$coz_bin/cozsftp  $ssh_opts -b- $remoteuser@$server <<EOB   
lzopts linerule=LF                                       
ascii                                                       
put //Mainframe.PS.FILE newfile.TXT                    
EOB                                                         
/*       


Mainframe PS file in HEX ON - It is DSORG=PS, RECFM=VBA, LRECL 257

Code: Select all

1                                                     THESASSYSTEM        18:20 FRIDAY, FEBRUARY 24, 2017   1 
F44444444444444444444444444444444444444444444444444444ECCECEEEEECD44444444FF7FF4CDCCCE64CCCDECDE4FF64FFFF444F44444444444
10000000000000000000000000000000000000000000000000000038521228235440000000018A200699418B065294198024B0201700010000000000

The file on the NAS in Hex format. The last but 2 bytes have x'0a'.

Code: Select all

31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 48 45 53 41 53 53 59 53 54 45 4d 20 20 20 20 20 20 20 20 31 38 3a 32 30 20 46 52 49 44 41 59 2c 20 46 45 42 52 55 41 52 59 20 32 34 2c 20 32 30 31 37 20 20 20 31 0a 0a 20     


The file is sent ok. But there are two x'0a' at the end of the line. Could you please let me know how to make this as just one x'0a'

Regards,
Vasanth.S
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: Two x'0a' at end of line

Post by dovetail »

Your "Mainframe PS file in HEX ON" display looks corrupted to me.
For example, at the end, a "1" on line one should line up with F and 1 on lines 2 and 3. It appears that there is an extra "0" in the middle of line 3

Also, if your dataset is RECFM=VBA, then the trailing spaces after the "1" should not be trimmed by default.

So something is happening that is not evident from the information provided.

Please post the output from the Co:Z SFTP transfer, which should show the options that were actually used.
vasanthz
Posts: 10
Joined: Thu Aug 03, 2017 4:34 pm

Re: Two x'0a' at end of line

Post by vasanthz »

Hi,

Thank you for your response. The PS file has large LRECL and when I copy pasted the HEX format, I made a mistake.
I do not have access to the system now, So Sorry about the delay in response. I would post the actual data once I am back.

Regards,
Vasanth.S
Post Reply