Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
FTP text file into Mainframe preserving spaces

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
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    Post subject: FTP text file into Mainframe preserving spaces
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Tue Sep 16, 2014 1:12 pm    Post subject: Reply to: FTP text file into Mainframe preserving spaces
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    Post subject:
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: 182
Location: UK

PostPosted: Tue Sep 16, 2014 1:57 pm    Post subject:
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    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Tue Sep 16, 2014 3:40 pm    Post subject: Reply to: FTP text file into Mainframe preserving spaces
Reply with quote

from the IBM manuals
http://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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Tue Sep 16, 2014 4:27 pm    Post subject: Reply to: FTP text file into Mainframe preserving spaces
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: 574
Location: The Universe

PostPosted: Tue Sep 16, 2014 4:43 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Identifying Interfaces in CICS/mainframe Ashishpanpaliya CICS 5 Fri Oct 13, 2017 3:21 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts Mainframe scheduling tool ddhar Compuware & Other Tools 2 Wed Sep 27, 2017 12:48 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us