Operating System - HP-UX
1825007 Members
2808 Online
109678 Solutions
New Discussion юеВ

FTP UTF 8 Files to Mainframe

 
Rajesh Sankarasubbu
Occasional Contributor

FTP UTF 8 Files to Mainframe

We have an application which translates an UTF-file( using ICONV) to EBCDIC and then ftp's it to the mainframe in binary mode .This works fine as long as the UTF file is fixed length.( that means all records in the file are of the same record length).During the FTP transfer , a dataset for the EBCDIC file is allocated with the appropriate record length and hence the record length is identified when it reaches the mainframe.But when the UTF-8 file has variable record length say first record is 90 bytes, second record is 104 bytes and the third record is 150 bytes , then during the ftp transfer if we allocate a dataset( could be a fixed block or variable block) with the maximum record length( 150 in this case , for variable block I need to allocate 150+4=154), the EBCDIC file thats received in the mainframe is clobbered , the record length is fixed to be 150 bytes .So the EBCDIC file in the mainframe would be, First Record- 150 bytes, Second Record - 150 Bytes and the third record will be 44 bytes , but my requirement is : First Record-90 bytes, Second record -104 bytes and third record - 150 bytes)

Question:
1. Is there any way to transfer a variable record length UTF-8 file which is converted to EBCDIC using ICONV process to the mainframe in binary mode and still identify the end of record.

2. Is there any other way to transfer variable record length UTF-8 file to the mainframe apart from ICONV.

I really appreciate your responses.
Thanks in advance.
3 REPLIES 3
Tom Geudens
Honored Contributor

Re: FTP UTF 8 Files to Mainframe

Hi,
We use the "xlate"-parameter of the ftp to accomplish this (instead of iconv) but the principal remains the same. As far as I know (we've tested this extensively - fixed length records cause a lot of overhead - but we might have missed something) you cannot send variable length records to mainframe from HP-UX. The mainframe file has to be fixed length, otherwise the length parameter gets ... clobbered is indeed the exact word.

We are now experimenting with zip-formats that can be read both on HP-UX and OS-390. This might make the ftp quicker ... but the files on both sides will still be fixed length.

Hope this helps,
Tom
A life ? Cool ! Where can I download one of those from ?
Dave La Mar
Honored Contributor

Re: FTP UTF 8 Files to Mainframe

Rajesh -
We are VM/VSE on the mainframe side and HP-UX 11.0 on the server side.
Our process around this is to use the pad function of our IP stack product on the mainframe.
To do so we get the file from the mainframe versus sending it from HP-UX. Transalation can be done through the IP stack.
Any cobol program then reading the file then can perform the translation as well as decipher the file as variable due to the padding with spaces, zeros, or what ever you use for the pad character.
We use this procedure extensively for both sequential, vsam ksds, and vsam esds.
Works fine in our shop. Not sure of the ip product your MVS system is using is using, but I would think this would be available in their stack.
Before you ask - "How does the mainframe know when the file is ready for pickup? -
When the file is ready in HP-UX we call a script that ends a file to the mainframe reader queue. This subsequently sets of the mainframe job to ftp to HP-UX and picks up the file.

Sounds like double work, but for a variety of reasons we have chosen this method.

Best of luck.
dl
"I'm not dumb. I just have a command of thoroughly useless information."
Rajesh Sankarasubbu
Occasional Contributor

Re: FTP UTF 8 Files to Mainframe

Thanks Tom and Dave for your responses.It is not easy to send a variable length UTF-8 file from HP-UX to the mainframe.I tried zipping the file and then sending it across, though the variable length is maintained ,the special characters are not preserved.Have you tried using convxlat utility to load a translation table in mainframe and then use that in the FTP-process using sbdataconn ? It seems they use this method successfully in our UK office.However when I tried this I couldnt run the convxlat utility.I guess for now we are sticking with the fixed format files.
Again thanks for your responses.