Page 1 of 1

Date Validation

Posted: Tue Jun 12, 2007 11:14 am
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

Posted: Tue Jun 12, 2007 11:15 am
by DSguru2B
Have you looked at IsValid() function?

Posted: Tue Jun 12, 2007 10:13 pm
by rafidwh
We Can Validate it using IsValid But How to abort the job using the IsValid function output

Posted: Tue Jun 12, 2007 10:33 pm
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.

Re: Date Validation

Posted: Tue Jun 12, 2007 11:04 pm
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.

Posted: Tue Jun 12, 2007 11:09 pm
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.