Functions to get total number of records

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
rameshkm
Participant
Posts: 24
Joined: Tue May 06, 2008 6:02 am
Location: chennai
Contact:

Functions to get total number of records

Post by rameshkm »

Hi Gurus ,

I have a situation like want to get how much records inserted in the target, and also status of the job in a table during runtime, is there any functions or logic in dastage parallel, please help in this regard thanks in advance.

[* Note - Title changed to be relevant to topic - Andy *]
Ramesh Kumar.M
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Please use meaningful subject lines, it helps searchers of the site. Your Subject and Additional Info should have been swapped, that or just skipped the whole "Hi" part as we're quite the friendly bunch and are all about the solutions. :wink:

All that can be done "after job" from either your O/S or by another job, simplest would be from a Server job because of the BASIC functions that do this. Check your online help for all of the DSGet* functions or the equivalents using dsjob from a command line script. Read about that in the Command Line Interface chapter of either Developer's Guide pdf.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rameshkm
Participant
Posts: 24
Joined: Tue May 06, 2008 6:02 am
Location: chennai
Contact:

I need in Parallel only

Post by rameshkm »

chulett wrote:Please use meaningful subject lines, it helps searchers of the site. Your Subject and Additional Info should have been swapped, that or just skipped the whole "Hi" part as we're quite the friendly bunch and are all about the solutions. :wink:

All that can be done "after job" from either your O/S or by another job, simplest would be from a Server job because of the BASIC functions that do this. Check your online help for all of the DSGet* functions or the equivalents using dsjob from a command line script. Read about that in the Command Line Interface chapter of either Developer's Guide pdf.
Thanks for your Immediate reply, but it very thank full if u give solution in Parallel.
Ramesh Kumar.M
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

These are not workarounds, they are your solutions. :?

If for some silly reason you insist on using a PX job for this, include a BASIC Transformer in the job.
-craig

"You can never have too many knives" -- Logan Nine Fingers
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

Because of the way DataStage is architected, it is much easier to get job metadata using server routines. For parallel jobs the alternative is to write and integrate custom C programs which most sites do not have the skill to create, and are much more difficult to maintain.

Because there is no need to get job metadata in parallel, it is usually easier to write a custom routine in DataStage BASIC, then call it from a server job or sequencer.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Isn't that what I said? You just used way more words, Andy. :wink:

(and nice sig, perhaps I should switch from silly quotes to titles, awards and my phone number, too) LOL
-craig

"You can never have too many knives" -- Logan Nine Fingers
agpt
Participant
Posts: 151
Joined: Sun May 16, 2010 12:53 am

Post by agpt »

If I simply copy the target stage to some other stage, wouldn't it give me total number of records processed which in fact is number of records in target?
rameshkm
Participant
Posts: 24
Joined: Tue May 06, 2008 6:02 am
Location: chennai
Contact:

Using Basic Trancformer In Px

Post by rameshkm »

chulett wrote:Isn't that what I said? You just used way more words, Andy. :wink:

(and nice sig, perhaps I should switch from silly quotes to titles, awards and my phone number, too) LOL


Thanks for all your suggestions, but when i am using Basic Transformer in Parallel Job the performance is very slow , more over the job is running panthom process for long time, please tell me if any special things to care while using basic transformer in PX, ie care on Partitions or any other things to do .
Thanks In advance.
Ramesh Kumar.M
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I really, really (really) do not understand the fear of Server jobs, especially in cases where they supply the perfect solution to the need. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I do (understand the fear) but disagree totally with it.

The main issue, it seems to me from my experience, is the concern about needing to maintain two skill sets.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ray.wurlod wrote:I do (understand the fear) but disagree totally with it.
Which is, of course, exactly what I meant. Totally disagree with the notion that they should be avoided at all costs, out of fear or skill set concerns or... what-knot. :wink:
-craig

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