Page 1 of 1

Validation in the datastage server job.

Posted: Wed May 16, 2012 12:21 pm
by sreewin7
Hi Everyone,
This may be simple for some one, i am not able to find correct solution to acheive this requirement, all you are thoughts are acceptted.

I have sourcefile with header and data ,this is in server job

[b]20120422 3 3900
1121 990 1300
1122 991 1300
1123 992 1300 [/b]

My requirement is to validate the header number of records and data number of columns and load data to file and numbers of records to other table.


Let me know if you are able to understand my requirement
Thanks
Sree

Re: Validation in the datastage server job.

Posted: Wed May 16, 2012 12:44 pm
by wahi80
Requirement is not clear, could you tell what is input data and waht is the expected output supposed to eb?

Re: Validation in the datastage server job.

Posted: Wed May 16, 2012 1:17 pm
by sreewin7
Input
20120422 3 3900
1121 990 1300
1122 991 1300
1123 992 1300

Output

1)Header record count and number records are matching we need to load data to audit table(number records or else aborte the job.
2) Data direct load to data table.

Thanks
Sree

Posted: Tue May 22, 2012 10:06 am
by go4it
You can spilt the file to get Header and trail records, when passing the trailer records use Aggregort Stage to get the COUNT on number of rows and compare with value in the Header.


Input File - Header Row - Check count
Trailer Agg -> Count(number of records)

Hope this helps

follow the Transformer execution flow

Posted: Fri Jun 29, 2012 1:37 am
by venkateshrupineni
if you have any indicator for Hdr and trailor records
then follow the below steps

1) from header record get the value of count using subsring if it fixed widh or u can use field function to get the count no from the header
2)in constraint exclude the hdr and trailr records based on your indicators
3)in derivation take the count of records at there you will exact count of records
4)take the count no from the stage varailble as a column
and then after keep filter stage then check the count if it match then only it process the records other wise it won't process the records

if you want to know whether the records are processed or not you can use the job sequnce uservariable activity...
'


-------------
Venky