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

FTP text file into Mainframe preserving spaces


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
DEEPAK GARG

New User


Joined: 21 Aug 2014
Posts: 8
Location: India

PostPosted: Tue Sep 16, 2014 1:10 pm
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Sep 16, 2014 1:12 pm
Reply with quote

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

New User


Joined: 21 Aug 2014
Posts: 8
Location: India

PostPosted: Tue Sep 16, 2014 1:20 pm
Reply with quote

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

Active User


Joined: 21 Dec 2011
Posts: 199
Location: UK

PostPosted: Tue Sep 16, 2014 1:57 pm
Reply with quote

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

New User


Joined: 21 Aug 2014
Posts: 8
Location: India

PostPosted: Tue Sep 16, 2014 3:13 pm
Reply with quote

Hex value is 05
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Sep 16, 2014 3:40 pm
Reply with quote

from the IBM manuals
www-01.ibm.com/support/knowledgecenter/#!/SSGH4D_10.1.0/com.ibm.xlf101a.doc/xlflr/asciit.htm%23asciit

in EBCDIC x'05' is HT ==> horizontal tab

so ...
YOU HAVE TABS ?

on windoze what You see is not what is stored

look at Your file in HEX
Back to top
View user's profile Send private message
DEEPAK GARG

New User


Joined: 21 Aug 2014
Posts: 8
Location: India

PostPosted: Tue Sep 16, 2014 4:24 pm
Reply with quote

You were right Enrico icon_smile.gif
Kindly tell what should i do to remove Horizontal tab and Preserve Spaces
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Sep 16, 2014 4:27 pm
Reply with quote

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

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Tue Sep 16, 2014 4:43 pm
Reply with quote

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

New User


Joined: 21 Aug 2014
Posts: 8
Location: India

PostPosted: Fri Sep 19, 2014 11:50 am
Reply with quote

Thanks Enrico
Your inputs were helpful in solvig the problem.
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top