Unwanted Trailing spaces

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
wasimus
Participant
Posts: 7
Joined: Mon Jul 10, 2006 9:53 am

Unwanted Trailing spaces

Post by wasimus »

Hi,

I am getting a wierd problem here. In one of our job (which ran successfully on DEV and QA) all of a sudden Datastage started inserting extra spaces in one of the columns. The part of SQL which is brining back extra spaces ias follows :

, CASE When (o2.ORG_DATE_CLOSED IS NULL or o2.ORG_DATE_CLOSED > SYSDATE
and not exists (select 0 from orgcloee where orgcloee.org_lvl_child = orgmstee.org_lvl_child
and sysdate between orgcloee.org_closed_fr_date and orgcloee.org_closed_to_date)) THEN 'A'
Else 'I'
END as U_STOREACTIVESTATUS

The column Length is defined as Varchar(1) but still getting extra spaces at the end. The DB is Oracle 10g.

I dont want to change the code now by putting in trim in Prod as there are so many jobs.

Thanks
basiltarun
Premium Member
Premium Member
Posts: 15
Joined: Tue Sep 09, 2003 10:41 pm

Unwanted Trailing spaces

Post by basiltarun »

I guess this has been discussed before.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not sure how you get extra anything in a one character field, can you be more specific as to exactly what it is you are seeing? :?

Is the version of your Oracle client different in production?
-craig

"You can never have too many knives" -- Logan Nine Fingers
wasimus
Participant
Posts: 7
Joined: Mon Jul 10, 2006 9:53 am

Post by wasimus »

chulett wrote:Not sure how you get extra anything in a one character field, can you be more specific as to exactly what it is you are seeing? :?

Is the version of your Oracle client different in production?



This is what I am seeing. I cut and paste the actual value from DS View into notepad, applied single quotes for your view, and putting it here :

'A '

The Oracle client is same as DEV and QA in Production and this problem is happening in prod. only which is a separate machine.

Thanks for your help
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Do you see spaces in your target table? What is the length defined in this table?
You are the creator of your destiny - Swami Vivekananda
wasimus
Participant
Posts: 7
Joined: Mon Jul 10, 2006 9:53 am

Post by wasimus »

anbu wrote:Do you see spaces in your target table? What is the length defined in this table?

I am getting warnings as below when inserting into Target table and job getting aborted after 50 warns.

[DataStage][SQL Client][ODBC][IBM(DataDirect OEM)][ODBC Oracle Wire Protocol driver][Oracle]ORA-12899: value too large for column "IGPMGR"."INTUPS_LOC"."U_STOREACTIVESTATUS"
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The only time I've ever seen anything remotely like this was when a slightly different (aka 'buggy') Oracle client version was installed in one environment, hence the question.
-craig

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