Handling Null values for Date, Timestamp in Schema file only

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

Locked
dsdsds4ever
Participant
Posts: 2
Joined: Sat Aug 25, 2012 6:13 am
Location: India

Handling Null values for Date, Timestamp in Schema file only

Post by dsdsds4ever »

Hi All,

I am using schema file concept to extract data from .txt file to dataset then load into Table.

Actually, we need to load 50 tables from 50 files..that's why We are using Schema file concept with Single extract and single load job.

I am facing the problem with handling nulls for Timestamp, date in Schema file only. not in Datastage transformer or NulltoValues..etc..!!

Please let me know How can we handle nulls for those two datatypes and default some values when null come in those fields..!!

My schema file:

record { delim='#', final_delim=end, record_delim_string="\n", date_format='%yyyy-%mm-%dd', quote=none}
( REQ_ID: int64;
REQ_SUBM_TS: nullable TIMESTAMP {null_field='1900-01-01 00:00:00'};
)

Please help on this asap..! waiting for your replies...!!!

Best Regards,
Williams
DataStage Developer,
IBM.
williams
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What exactly is your question? You posted a schema that does null handling for "REQ_SUBM_TS", i.e. when read it replaces '1900-01-01 00:00:00' with a null value.

p.s. I would have answered the question yesterday, but since you posted "ASAP" despite warnings not to do so I opted to wait a bit rather than not respond at all. This is a volunteer site and I know of nobody who enjoys being told to hurry up when they do not need to do so.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:?

Why post this again? You already have a perfectly lovely version of your question here and that is where you should back to if you have additional questions. This one is done.

<click>
-craig

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