View previous topic :: View next topic
|
Author |
Message |
RohitVerma
New User
Joined: 27 May 2010 Posts: 2 Location: Mumbai
|
|
|
|
Hello,
I require to FTP some files to windows based server in text format.
The files which I FTP contains Hex 1A character to mark End of file.
This Hex character is causing problem as the files need to be processed at a windows based server.
Please suggest some way to remove/avoid this Hex 1A character in the text files. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Where does the hex 1A character come from? This would not normally be a character seen in a text file on the mainframe. |
|
Back to top |
|
|
RohitVerma
New User
Joined: 27 May 2010 Posts: 2 Location: Mumbai
|
|
|
|
As i mentioned the files required to be sent to a windows based server for processing. So the format needs to be changed from EBCIDIC to ASCII during FTP process.
This Hex 1A charcter is inserted by mainframe to mark end of file while converting file to ASCII format. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
AFAIK the ASCII EOF mark (Ctrl-Z or hex '1A') is mandatory so there is no provision for suppressing it. My thought is to first convert your data into ASCII, allowing you to determine what values are placed where for EOL and EOF, and then sending that ASCII data in binary mode. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
A PC uses the hex 1A character to denote the end of the text file and you do not want to remove this character as there may be side effects. PC software recognizes the hex 1A and stops file processing at that point. If you have software that is attempting to process it as data, your software is wrong and needs to be corrected.
As far as I know, unless you start transferring the file in binary, there is no way to prevent the hex 1A from being added to the end of the file -- that is just the way the PC works. |
|
Back to top |
|
|
|