DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic has been marked "Resolved."
Author Message
js_j
Participant



Joined: 19 Aug 2011
Posts: 12
Location: India
Points: 94

Post Posted: Fri Aug 19, 2011 5:15 am Reply with quote    Back to top    

Hi,
The following is my field structure:
201106;4000;160,50;12345678
200106;4008;6,50;12345679 etc..
I have to load these into a Dataset. I have used a transformer for extracting the field info like Input.Fileinput[1,6] like wise and loaded the first two columns in the Dataset. but for the third column i am not knowing how to extract the data as they are of variable length. The data in the third column should be treated as decimal with scale of 2 digits.
It is a parallel job and let me know how to load the remaining columns.
I am new to this forum and this is my first post.

thanks,
JJ
arvind_ds
Participant



Joined: 16 Aug 2007
Posts: 428
Location: Manali
Points: 4204

Post Posted: Fri Aug 19, 2011 5:30 am Reply with quote    Back to top    

Your Job Design should be like this.

Seq File --> Transformer --> DataSet

Use semicolon as a Delimeter in Seq File stage properties.

HTH Cool

_________________
Arvind
Rate this response:  
Not yet rated
js_j
Participant



Joined: 19 Aug 2011
Posts: 12
Location: India
Points: 94

Post Posted: Fri Aug 19, 2011 5:38 am Reply with quote    Back to top    

arvind_ds wrote:
Your Job Design should be like this.

Seq File --> Transformer --> DataSet

Use semicolon as a Delimeter in Seq File stage properties.

HTH Cool


Hi,
used the same. works for the first two columns but not for the third one.
Sad
Rate this response:  
Not yet rated
arvind_ds
Participant



Joined: 16 Aug 2007
Posts: 428
Location: Manali
Points: 4204

Post Posted: Fri Aug 19, 2011 5:41 am Reply with quote    Back to top    

What is the data type for third column.

Change it to varchar, everything written in a sequential file is of type string.

_________________
Arvind
Rate this response:  
Not yet rated
js_j
Participant



Joined: 19 Aug 2011
Posts: 12
Location: India
Points: 94

Post Posted: Fri Aug 19, 2011 5:45 am Reply with quote    Back to top    

arvind_ds wrote:
What is the data type for third column.

Change it to varchar, everything written in a sequential file is of type string.


I have tried to use the input file as one string such as Fileinput/varchar/64000 with no nullability. I am using the column as varchar only.
Smile
Rate this response:  
Not yet rated
arvind_ds
Participant



Joined: 16 Aug 2007
Posts: 428
Location: Manali
Points: 4204

Post Posted: Fri Aug 19, 2011 5:50 am Reply with quote    Back to top    

Define 4 columns in the column definition of seq file stage with type varchar, put some number in lenght field and nullability no.

Set delimeter to semicolon.

I tested one job at my end with below data in seq file and it worked fine.

201106;4000;160,50;12345678
200106;4008;6,50;12345679

Are you able to view data from sequential file stage?

_________________
Arvind
Rate this response:  
Not yet rated
js_j
Participant



Joined: 19 Aug 2011
Posts: 12
Location: India
Points: 94

Post Posted: Fri Aug 19, 2011 5:58 am Reply with quote    Back to top    

arvind_ds wrote:
Define 4 columns in the column definition of seq file stage with type varchar, put some number in lenght field and nullability no.

Set delimeter to semicolon.

I tested one job at my end with below data in seq file and it worked fine.

201106;4000;160,50;12345678
200106;4008;6,50;12345679

Are you able to view data from sequential file stage?


Hi,
This works Smile
Just for Information why i cant the get when i am trying to see the whole file as a single string and then separate the same?
if possible let me know.

thanks once again.
JJ
Rate this response:  
Not yet rated
arvind_ds
Participant



Joined: 16 Aug 2007
Posts: 428
Location: Manali
Points: 4204

Post Posted: Fri Aug 19, 2011 5:59 am Reply with quote    Back to top    

Rome was not built in a day

_________________
Arvind
Rate this response:  
Not yet rated
js_j
Participant



Joined: 19 Aug 2011
Posts: 12
Location: India
Points: 94

Post Posted: Fri Aug 19, 2011 6:05 am Reply with quote    Back to top    

arvind_ds wrote:
Rome was not built in a day


Cool...
Very Happy
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54431
Location: Sydney, Australia
Points: 295208

Post Posted: Fri Aug 19, 2011 4:37 pm Reply with quote    Back to top    

Specify None as the record terminator.

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne (especially seeking good business analysts)
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours