Validation in the datastage server job.

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sreewin7
Participant
Posts: 41
Joined: Tue Sep 14, 2010 8:48 pm

Validation in the datastage server job.

Post 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
wahi80
Participant
Posts: 214
Joined: Thu Feb 07, 2008 4:37 pm

Re: Validation in the datastage server job.

Post by wahi80 »

Requirement is not clear, could you tell what is input data and waht is the expected output supposed to eb?
sreewin7
Participant
Posts: 41
Joined: Tue Sep 14, 2010 8:48 pm

Re: Validation in the datastage server job.

Post 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
go4it
Participant
Posts: 34
Joined: Wed Apr 23, 2008 5:49 am
Location: UK

Post 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
With Regards
M
venkateshrupineni
Participant
Posts: 15
Joined: Wed May 02, 2012 3:38 am

follow the Transformer execution flow

Post 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
Post Reply