system variables

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
via
Premium Member
Premium Member
Posts: 118
Joined: Fri Sep 23, 2005 3:10 pm

system variables

Post by via »

HI,
Can any one throw light on system variables (@inrownum, @outrownum,@true,@false).Can we use them in transformer stage to get rowcount of specified links?

Thanks..
Via
-------------------------------------
Learn all the way, as you Grow each Second
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What kind of 'light' are you looking for? :?

Have you checked the online help for System Variables? The explanations are a little terse there but I haven't really needed more than that to know how to use them. Or if I did, a quick experimental test job or routine helped.

@TRUE and @FALSE are just that, true and false constants that equate to 1 and 0 respectively. Can you use them to get row counts? No. Use them in an expression.

@INROWNUM and @OUTROWNUM are counters for the 'current record number' either coming in or going out of a transformer. Running. Per link. Can you use them to get row counts? Yes, of course.

Are you looking for a 'grand total'? Make sure you understand it's only a grand total if you have the count from the last record.
-craig

"You can never have too many knives" -- Logan Nine Fingers
via
Premium Member
Premium Member
Posts: 118
Joined: Fri Sep 23, 2005 3:10 pm

Post by via »

Thanks Craig.
Actually we have a routine which we are calling after each job to get jobstarttime, endtime and rowcount.But i am just thinking can we use any variables in transformer stage to get rowcounts.

We need 'grand total'.Its clear.I think calling routine is better.

Thanks
Via
-------------------------------------
Learn all the way, as you Grow each Second
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If you need running counts within the job, then those system variables will do the trick. After job, for grand totals, best to stick with other mechanisms - DSGetLinkInfo, for example, which I would think is what you are using in your routine.
-craig

"You can never have too many knives" -- Logan Nine Fingers
via
Premium Member
Premium Member
Posts: 118
Joined: Fri Sep 23, 2005 3:10 pm

Post by via »

Yes Craig we are using DSGetLinkInfo and DSGetJobInfo in routine.Its working fine.Why i posted is-Just curious to know any functions or variables could do this.

Thanks..
Via
-------------------------------------
Learn all the way, as you Grow each Second
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I'm prepared to bet you do NOT require running totals, just the row counts at the end. These are captured for you in the log if you enable APT_PM_ROW_COUNTS (from memory). The DSGetLinkInfo() function can report the total rows on the link or the per-instance (per-node) row counts for that link.

There are no system variables that expose this information once the job run has been completed.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply