Page 1 of 1

Data Validation of sequential files

Posted: Fri Jan 25, 2008 4:10 pm
by Champa
Hi,

I have to validate sequential file columns for format matching. Please let me know what tool you recommend.

Thanks

Posted: Sat Jan 26, 2008 12:05 am
by ray.wurlod
A more detailed specification for a start.

Does "format matching" simply refer to the fields in the file (the right number of fields, the correct width for fixed-width, etc.) or does it refer to something more specific on a per-field basis?

Posted: Sat Jan 26, 2008 7:01 am
by Champa
Hi,

Thanks Ray. Yes it means the right number of fields, the correct width for fixed-width, format mask and validate the value with a check condition.

Eg for format checking:

Phone number format in USA:

215-937-8323

Social Security Number format in USA:

249-91-0000

Thanks

Posted: Sat Jan 26, 2008 4:26 pm
by ray.wurlod
OK, DataStage can do all that. Assuming you're using a parallel job, the Sequential File stage will reject any record that does not match the number/width of fields and can capture these on a reject link. Format you would have to do field-by-field (obviously) in a Transformer stage.
In a server job read the entire line as a single VarChar (I am assuming here that the file has line terminators), parse and check everything in a Transformer stage and, again, set up a rejects link. Format matching is easier in server jobs or BASIC Transformer stage in parallel jobs because the DataStage BASIC Matches operator can match data class (alphabetic, numeric or any), for example InLink.US_Phone Matches "3N'-'3N'-'4N" or InLink.SSN Matches "3N'-'2N'-'4N" or, to be more flexible about the delimiter, InLink.US_Phone Matches "3N1X3N1X4N"

Posted: Sun Jan 27, 2008 6:55 am
by Champa
Thank you once again Ray.