todsn crlf iconv extra hex values at end

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
tsdjim
Posts: 64
Joined: Fri May 07, 2010 2:21 am

todsn crlf iconv extra hex values at end

Post by tsdjim »

I have a UTF-8 file that displays correctly under Windows, however when I transfer it to the host to IBM-420 an extra line is inserted at the end with two hex characters.
fromdsn -s UTF-8 -t UTF-8 -l crlf //DD:MYIN |
iconv -f UTF-8 -t UCS-2 |
iconv -f UCS-2 -t IBM-420 |
todsn -s IBM-420 -t IBM-420 -l 0x0D15 //DD:MYOUT
The char and hex display for the last 2 lines:


03;000003;
FF5FFFFFF544
03E000003E00

..
00
00
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: todsn crlf iconv extra hex values at end

Post by dovetail »

You are using Co:Z SFTP to transfer to z/OS, correct?

If so, please capture a Co:Z SFTP server session log with this in your $HOME/.ssh/sftp-server.rc :

export SFTP_SERVER_OPTIONS="-e -l debug3"
export COZ_LOG=T

for information on configuration, see: http://dovetail.com/docs/sftp/config.ht ... _server_rc
tsdjim
Posts: 64
Joined: Fri May 07, 2010 2:21 am

Re: todsn crlf iconv extra hex values at end

Post by tsdjim »

No, actually I am using COZBATCH not SFTP
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: todsn crlf iconv extra hex values at end

Post by dovetail »

I see, I was thrown off the trail since you posted this in the SFTP forum.

It might be helpful to see what the input file to todsn is.

So try this:

fromdsn -s UTF-8 -t UTF-8 -l crlf //DD:MYIN |
iconv -f UTF-8 -t UCS-2 |
iconv -f UCS-2 -t IBM-420 |
od -h

and see if you get what you expect (in IBM-420)
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: todsn crlf iconv extra hex values at end

Post by dovetail »

Also, I can't figure out why you don't want this - ?
fromdsn -b -l rdw //DD:MYIN |
todsn -s UTF-8 -t IBM-420 -l rdw //DD:MYOUT
- Is it that you want to add literal CR-LF's to the data set pointed to by DD:MYOUT?

- What is the DCB/RECM of DD:MYIN and DD:MYOUT?

- Do you want the logical records in DD:MYIN map to the logical records in DD:MYOUT?

- How is the file being transmitted to Windows, and do you want CRLF's inserted in place of the logical records? If so, where?
Post Reply