Fixed length issue

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
pandujoy
Participant
Posts: 70
Joined: Tue May 13, 2008 1:37 pm

Fixed length issue

Post by pandujoy »

Hi Guru's,

I am not sure how thsi fixed lenght works.....

I am facing a problem -

I have 4 fields where i have to do a lookup for a particular field against oracle Db. all the 4 fields have varchar 10 nullable "Y" .

Not sure why this is happening. If i just take one field into the transformer neglecting the rest 3 fields the job works fine but when i include the rest of the fields in the transformer and then to lookup stage the jobs fails. Can anyone tell me how to fix this issue.

appreciate your concern
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

What is the error ?

What are you doing differently in the transformer in the second case ?

What if you do a direct map ?
pandujoy
Participant
Posts: 70
Joined: Tue May 13, 2008 1:37 pm

Post by pandujoy »

thanks for the reply.

Let me expain -
I have 4 fields and a,b,c,d

i have to do a lookup for "a" on oracle db.

so the job desing is
sequentialfile - transformer- lookup-dataset

so when i add all the four fields in transformer the lookup fails..but when i just pull field "a" the lookup works fine. Not sure why it is so.

all the source fields are varchar and nullable "Y"
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

What columns are used in the lookup ?

What kind of lookup is it ? What is the SQL inside ?

What is the 'missing match' condition in the lookup ?
pandujoy
Participant
Posts: 70
Joined: Tue May 13, 2008 1:37 pm

Post by pandujoy »

Its a sparse lookup and the field "a'' comes in the lookup. I have to check for the available lookup and then pass it on.

Reg. SQL its just select statement
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

But what IS the SQL statement ?

Have you included variables for b - d ?

What is the option for missing records in the lookup ?

What is the error message you receive ?
pandujoy
Participant
Posts: 70
Joined: Tue May 13, 2008 1:37 pm

Post by pandujoy »

come on its the problem with the fixed with lenght
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Post by Kryt0n »

Not the attitude of someone who really wants to receive help...

Considering you haven't specified anything that is actually fixed width, why do you think it is a fixed width issue?

Since you haven't specified your problem particularly well, you should appreciate Sainath's attempts to get the full picture.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You simply don't really have VarChar in a fixed width file - you have Char.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ds_ashish
Participant
Posts: 15
Joined: Thu Nov 23, 2006 12:30 am

Post by ds_ashish »

Hi,

i'm totally aggred with Ray's point.

Are you able to read the fixed width data from sequentail file?
I mean to say, just right click on the sequential file where you mentioned the fixed width file and see whether you are able to see the data or not.

If you are having some issues while reading data itself, means you have not configured your fixed width file properly.

Please let us know so that some one can help you out from this.

Thanks
Ashish.
Thanks in Adv.
Ashish
pandujoy
Participant
Posts: 70
Joined: Tue May 13, 2008 1:37 pm

Post by pandujoy »

thanks ashis/ray

I just realized that the fixed width is at oracle end. when i am doing a lookup @ the oracle db i am gettng this error....is there a way to just make both (source and lookup) fixed widht
swades
Premium Member
Premium Member
Posts: 323
Joined: Mon Dec 04, 2006 11:52 pm

Post by swades »

pandujoy wrote:.... i am gettng this error....
which error you are getting....paste here your error message.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

pandujoy wrote:is there a way to just make both (source and lookup) fixed widht
Yes, make sure that they have identical data type and are padded with identical characters.

Is your Shift key broken? You aren't e.e.cummings, so please don't try to be.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply