View previous topic :: View next topic
|
Author |
Message |
DEEPAK GARG
New User
Joined: 21 Aug 2014 Posts: 8 Location: India
|
|
|
|
Hello!
I am trying to ftp text file into mainframe dataset. While doing FTP, spaces in text file is not carried forward to dataset in Mainframe. In mainframe just one space is retained.
Kindly suggest me a way to preserve spaces in mainframe dataset |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
are You sure that that what You see are spaces and not tabs ?
ftp might trim trailing spaces,
never heard of eliminating anything in the middle of a record |
|
Back to top |
|
|
DEEPAK GARG
New User
Joined: 21 Aug 2014 Posts: 8 Location: India
|
|
|
|
Hello Enrico
In my text file there are many spaces between values
In mainframe dataset there is only one space.
Thanks
Deepak |
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
I've seen the same thing when generating datasets on the mainframe to send to SMTP. The e-mail ends up as having duplicate spaces dropped. I got round it by creating the "spaces" as x'41' rather than x'40', but that won't help the OP.
As Enrico has said, are you sure they are spaces and not tabs? What is the hex value in both the .txt file and the mainframe dataset? |
|
Back to top |
|
|
DEEPAK GARG
New User
Joined: 21 Aug 2014 Posts: 8 Location: India
|
|
|
|
Hex value is 05 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
Back to top |
|
|
DEEPAK GARG
New User
Joined: 21 Aug 2014 Posts: 8 Location: India
|
|
|
|
You were right Enrico
Kindly tell what should i do to remove Horizontal tab and Preserve Spaces |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
since You did not tell how the windoze file was created, it is difficult to tell.
if it is program-generated fix the program
if it is a document created with some editor fix the preferences in order not to use tabs |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
Mr. Sorichetti is 100% correct. Just last week I got hit with that exact problem. The Windoze NOTEPAD utility displayed blanks, but when I sent the file to the mainframe, the mainframe data set had X'05' when I displayed the data set in hex. After uttering words that are not suitable for a family oriented web site, I arranged my mainframe program to handle the tab character. Many toy machine text editors store tabs rather than blanks to reduce file size, and are pretty stubborn about not using tab characters. A few years ago I had to write a toy machine program to remove tab characters from a file as I could not persuade the text editor to not use tabs in its files.
Actually, what happened is the original toy machine data was in a spreadsheet that was transferred to a text file using copy in the spreadsheet to paste in a notepad file. I then sent the notepad file to the mainframe. |
|
Back to top |
|
|
DEEPAK GARG
New User
Joined: 21 Aug 2014 Posts: 8 Location: India
|
|
|
|
Thanks Enrico
Your inputs were helpful in solvig the problem. |
|
Back to top |
|
|
|