Date Validation

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
rafidwh
Participant
Posts: 179
Joined: Mon Oct 10, 2005 11:30 pm

Date Validation

Post by rafidwh »

Hi,

My source is a flat file and I need to validate the date ,if date is valid then the process should flow else if date is invalid the job should abort.

Pl through some light,

Regards,
Rafidwh
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Have you looked at IsValid() function?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
rafidwh
Participant
Posts: 179
Joined: Mon Oct 10, 2005 11:30 pm

Post by rafidwh »

We Can Validate it using IsValid But How to abort the job using the IsValid function output
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

When validation fails in transformer direct it to a seperate link (You can put a peek stage) and specify in the transformer constraint 'abort after rows' as 1. (Wonder why you want to do this inside a job, not suggested at all). If you are checking for a file with valid date in it you can do this before calling the job itself in a sequence.
Last edited by JoshGeorge on Tue Jun 12, 2007 11:58 pm, edited 1 time in total.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: Date Validation

Post by sachin1 »

i think you want to check the date format or if the date is valid at execution, i mean to say while you are propogating input data to output.

in tranformer you can check if date is valid, if not you can call an inbuilt routine by Ardent Software, Inc. of sdk UtilityAbortToLog.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

sachin1 - that would work only for a server job or if a BASIC transform stage were used in a PX job. The method shown by JoshGeorge above is a common way to abort a job with a given data condition by splitting the stream and setting a trigger to abort the job if any data goes down the error stream.
Post Reply