Automatic conversion of spaces in CFF to Null in oracle

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
Ragunathan Gunasekaran
Participant
Posts: 247
Joined: Mon Jan 22, 2007 11:33 pm

Automatic conversion of spaces in CFF to Null in oracle

Post by Ragunathan Gunasekaran »

Hi ,
I am extracting from the mainframe file and dumping the data into the target table using the load option . All the fields are non nullable both in the source and the target . But due to the blank spaces in the source PX converts them to null and tries to insert them in the target . The job aborts due to this ... Any help on this please


Mydesign looks like this

CFF(No of readers =1)------->Oracle Stage (Write method =load)


Any help on this please ... I have tried to search in the forum.There are issue like this but they were not resolved or there were no workarounds available ,......
Regards
Ragu
Aruna Gutti
Premium Member
Premium Member
Posts: 145
Joined: Fri Sep 21, 2007 9:35 am
Location: Boston

Post by Aruna Gutti »

Did you tried inserting a transformer stage in between CFF and Oracle stages to manipulate the fields with Spaces ?

If the Mainframe file has spaces in a field it is not a null value unless you define it so.

Are you sure you have spaces in the mainframe file and not Low Values ?
shamshad
Premium Member
Premium Member
Posts: 147
Joined: Wed Aug 25, 2004 1:39 pm
Location: Detroit,MI

Post by shamshad »

Extending to what Aruna said, try to decode the value of the column that is creating issue. See what the SEQ() / CHAR() value is and then make sure they are indeed spaces or low values
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Oracle may be converting the spaces to nulls and not PX, if that's the case then you can set APT_ORACLE_PRESERVE_BLANKS to true to stop that from happening.
-craig

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