Page 1 of 1

Fixed length issue

Posted: Thu Nov 19, 2009 8:07 am
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

Posted: Thu Nov 19, 2009 8:31 am
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 ?

Posted: Thu Nov 19, 2009 8:48 am
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"

Posted: Thu Nov 19, 2009 8:51 am
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 ?

Posted: Thu Nov 19, 2009 8:53 am
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

Posted: Thu Nov 19, 2009 9:49 am
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 ?

Posted: Thu Nov 19, 2009 9:55 am
by pandujoy
come on its the problem with the fixed with lenght

Posted: Thu Nov 19, 2009 2:44 pm
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.

Posted: Thu Nov 19, 2009 5:26 pm
by ray.wurlod
You simply don't really have VarChar in a fixed width file - you have Char.

Posted: Fri Nov 20, 2009 4:47 am
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.

Posted: Fri Nov 20, 2009 8:41 am
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

Posted: Fri Nov 20, 2009 10:50 am
by swades
pandujoy wrote:.... i am gettng this error....
which error you are getting....paste here your error message.

Posted: Fri Nov 20, 2009 6:58 pm
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.