Sequential file: spaces between two characters in all fields

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
adityavarma
Premium Member
Premium Member
Posts: 104
Joined: Thu Jul 12, 2007 11:32 pm
Location: Canada

Sequential file: spaces between two characters in all fields

Post by adityavarma »

Hi DS Gurus,

I am reading a tab delimited file using a sequential file stage. When I view the file every character has a space between them.
When I view the file in Excel, Textpad or UNIX the file looks good.

For example:
Sample source file looks like below
OrderReadyForPickup_EN_QA Bounced

But when I read in sequential file stage it is showing as below. I also loaded the file into a DataStage Dataset and even in the Dataset it is showing as below:

O r d e r R e a d y F o r P i c k u p _ E N _ Q A B o u n c e d

The below are the settings I used in sequential file stage:
Final Delimiter = End
Delimiter = tab
Quote= none

I tried with all type of delimiters and null field value but could not read correctly. I even tried with DOS format but still no luck

Can you please provide your guidance on this issue ?

Thanks,
Aditya K
Last edited by adityavarma on Fri Feb 05, 2016 4:48 pm, edited 5 times in total.
Thanks
Aditya Kutcharlapati
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You see them that way where exactly? If it is having an issue reading / parsing the file it can show you the 'raw' data and it does that with spaces between everything inside curly braces like so:

{O r d e r R e a d y F o r P i c k u p _ E N _ Q A B o u n c e d}

Is that what you are seeing?
-craig

"You can never have too many knives" -- Logan Nine Fingers
adityavarma
Premium Member
Premium Member
Posts: 104
Joined: Thu Jul 12, 2007 11:32 pm
Location: Canada

Post by adityavarma »

Hi Craig,

It is showing as below without braces
O r d e r R e a d y F o r P i c k u p _ E N _ Q A B o u n c e d

it is same for all the 15 columns
Thanks
Aditya Kutcharlapati
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Again, showing where exactly?
-craig

"You can never have too many knives" -- Logan Nine Fingers
adityavarma
Premium Member
Premium Member
Posts: 104
Joined: Thu Jul 12, 2007 11:32 pm
Location: Canada

Post by adityavarma »

Hi Craig,

It is showing when i read the data in sequential file and Dataset view data.

Now I have loaded the file into another sequential file, when i view the file in UNIX it is showing correctly which is good.

but my other issue is with the transformation, when i do substring to 10 characters
it is loading as below and remaining characters are been stripped off
O r d e r

Original: OrderReadyForPickup
Expected: OrderReady
Thanks
Aditya Kutcharlapati
adityavarma
Premium Member
Premium Member
Posts: 104
Joined: Thu Jul 12, 2007 11:32 pm
Location: Canada

Post by adityavarma »

The issue is with the source file. it is having hex 00 (UTF-16)
I have changed it to UTF-8 and it is loaded sucessfully

iconv -f UTF-16le -t UTF-8 testsample.txt > sampletest.txt
Thanks
Aditya Kutcharlapati
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

This hex 00, is that what was between all of the characters? If so, you need to thank whomever sent that to you for the wonderful puzzle. :roll:

:wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply