create control jobs to get the record count in the target

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
sunitha_cts
Participant
Posts: 98
Joined: Thu Feb 05, 2009 1:14 am
Location: visakhapatnam
Contact:

create control jobs to get the record count in the target

Post by sunitha_cts »

HI,

i should create control job to get the record count of the of the target file,my source is flat files ,how should i create this.what are the fields i should configure.how to use it in job sequencer to load 5 flat files.

Thanks
sunitha
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

However you like. Simplest is probably a wc -l command on source and target, executed through Execute Command activity in sequence or DSExecute in job control routine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sunitha_cts
Participant
Posts: 98
Joined: Thu Feb 05, 2009 1:14 am
Location: visakhapatnam
Contact:

Post by sunitha_cts »

my question is like when i created a job sequencer for 5 flat files which i am using with job activithy stages how can i get record count should get the record count .iam asked to create a control job for this purpse.
Thanks
sunitha
elias.shaik
Participant
Posts: 51
Joined: Sat Dec 09, 2006 3:32 am

Post by elias.shaik »

If you want to get the number of records processed in the job then After job routine would do fine.Remember few records could be rejected at stage level for such issues this is a better option.


Or If you just want the count of records from source and target files then wc -l suggested above is the best option .
------------
Elias
nirdesh2
Participant
Posts: 56
Joined: Thu Nov 20, 2008 12:18 pm
Location: Noida

Post by nirdesh2 »

To count the number of records in each file, you can use File Name Column property of sequential stage and then using aggegate by grouping on file name, you can count the records in each file.
Nirdesh Kumar
elias.shaik
Participant
Posts: 51
Joined: Sat Dec 09, 2006 3:32 am

Post by elias.shaik »

Hi Nirdesh,

could you please explain in detail.
------------
Elias
nirdesh2
Participant
Posts: 56
Joined: Thu Nov 20, 2008 12:18 pm
Location: Noida

Post by nirdesh2 »

SeqFileStg1----->Funnel-------->Aggregate Stage(Aggregate on File Name)
SeqFileStg2
SeqFileStg3
Nirdesh Kumar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That would be a "PX specific" solution and not applicable to a Server job, unfortunately.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply