row count

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

chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Last one into USERSTATUS wins, so no. Suggest you go back to the aggregator approach, for counts you won't need three to get three counts back out.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rsunny
Participant
Posts: 223
Joined: Sat Jul 03, 2010 10:22 pm

Post by rsunny »

Hi craig ,

I have to get three counts based on inserts , updates, rejects and if i go with aggregator , i should go with three aggregators right? so if that is the case i need three aggregators which i am not thinking to use and i used DSGETLINKINFO in the transformer stage directly without using any routines , it is working fine but some times it is giving the wrong result which is actual row count-1. So do i need to go with three aggregator. Is that the only solution for this problem. As i can use a transform routine but i might develop moe jobs and if that is the case i have to hardcode in the routine for each job and i dont want to do which i want to be common acroos the jobs if i am going to reuse the job with different job names.


Thanks in advance
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

For a generic solution, you are way better off building a stand-alone routine that takes 3 arguments. Call it 3x in a Sequence job and pass that as parameters to a job that just loads the audit table.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rsunny
Participant
Posts: 223
Joined: Sat Jul 03, 2010 10:22 pm

Post by rsunny »

chulett wrote:There is no output as you haven't coded any in. What exactly do you want to do with this count? Perhaps USERSTATUS would work for you? ...
Hi craig ,

I have a question like when we create a after job subroutine , can we get the output from that routine . I mean like i used after job subroutine to get the row count so can i able to view the output of the row count? if so can you please tell me how is it possible.

Any help is really appreciated

Thanks in advance
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Since you can't use USERSTATUS write it to a file, that or the job's log. File would be easier to retrieve.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rsunny
Participant
Posts: 223
Joined: Sat Jul 03, 2010 10:22 pm

Post by rsunny »

chulett wrote:Since you can't use USERSTATUS write it to a file, that or the job's log. File would be easier to retrieve.
Hi craig,

can you please explain me how do we do it with userstatus and how do we write job log into a file

Thanks in advance
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You said you already use USERSTATUS in the job, so that's off the table. To write to the log, simply call DSLogInfo().
-craig

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