Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 10203
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: 175
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: 10203
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: 10203
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 User


Joined: 30 Nov 2013
Posts: 462
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
This topic is locked: you cannot edit posts or make replies. Urgent Mainframe Requirments (2-10 yr... Shankar779 Mainframe Jobs 0 Sun Nov 27, 2016 1:48 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us