IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

FTP: Hex 1A character appearing while FTP file to windows.


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
RohitVerma

New User


Joined: 27 May 2010
Posts: 2
Location: Mumbai

PostPosted: Thu May 27, 2010 5:13 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu May 27, 2010 5:20 pm
Reply with quote

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
View user's profile Send private message
RohitVerma

New User


Joined: 27 May 2010
Posts: 2
Location: Mumbai

PostPosted: Thu May 27, 2010 6:17 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu May 27, 2010 6:35 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu May 27, 2010 6:37 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top