OCI column type definition

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Orieos
Participant
Posts: 19
Joined: Mon Aug 23, 2004 3:19 am
Location: Lisbon - Portugal

OCI column type definition

Post by Orieos »

Hi guys!

I'm facing a somewhat curious situation and I would like to know if someone ever faced this before.

I have a very simple job:

FlatFile ---------> OCI --------> FlatFile2

Inside the OCI stage, on Inputs, I'm declaring table XPTO with 2 columns and using pure insert:
cod_x Char 2
dsc_x Char 50

NOTE: Yes, yes...I know normal people do not use char but...it's a very old job, NOT made by me and...I'm in pain here... :)

On the Output of the OCI I'm using a column generated query that makes a simple inner join between table XPTO and XPTO2. The columns that I'm using are:
XPTO.cod_x Numeric 2
XPTO.dsc_x Char 50
XPTO2.lkup_cod Numeric 2
XPTO2.lkup_dsc Char 50

I know i previously declared cod_x as being a char 2 and I also know that this is not a very good practice (not to say an awful practice) but thats the way the job was originaly done and...it was working fine...until now (we just migrated from 6x to 7.5.1.A).

The problem is that the FlatFile2 ends up with corrupt data at the field that was previously declared as Char and now as Numeric.

I found another curious thing. If in the output of the OCI the ArraySize has value 1, the data in the FlatFile is correct. If I increase this value I get corrupted data.

Has anyone ever faced this kind of problem...sniff :(

PS: Sorry for the lousy subject but... I didn't have a clue on what to call this topic. :roll:
Last edited by Orieos on Mon Apr 17, 2006 11:35 am, edited 1 time in total.
diamondabhi
Premium Member
Premium Member
Posts: 108
Joined: Sat Feb 05, 2005 6:52 pm
Location: US

Post by diamondabhi »

I had this problem, the solution (not very good though) was to change the data types accordingly as 7.5.1 is not very liberal with data types.
Even I would like to know a better solution.

Thanks in advance.
Abhi.
Every great mistake has a halfway moment, a split second when it can be recalled and perhaps remedied.
Orieos
Participant
Posts: 19
Joined: Mon Aug 23, 2004 3:19 am
Location: Lisbon - Portugal

Post by Orieos »

Thanks Abhi.

That was the solution I adopted. It worked fine but...I still would like to know what's the cause of this situation ( besides bad development :) of course)

Regards
Ricardo
diamondabhi
Premium Member
Premium Member
Posts: 108
Joined: Sat Feb 05, 2005 6:52 pm
Location: US

Post by diamondabhi »

Oreios,
Good it worked for u, I think its better this way, so as we would be more careful with data types.
Every great mistake has a halfway moment, a split second when it can be recalled and perhaps remedied.
Post Reply