how to count number of records in source file

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
vijaya
Participant
Posts: 15
Joined: Mon Jul 24, 2006 2:51 am

how to count number of records in source file

Post by vijaya »

Hi all,
Please let me know how to count number of records in a source file.Reply me soon
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Try using the "SEARCH" facility, it is of great help in many cases when the problem is one that others might have had.

The easiest way is to use an external call, i.e. "wc -l" to get this information on UNIX or on Windows with something like MKS toolkit installed.
skreddy2020
Participant
Posts: 4
Joined: Mon Mar 13, 2006 1:34 am
Location: Hyderabad

Re: how to count number of records in source file

Post by skreddy2020 »

vijaya wrote:Hi all,
Please let me know how to count number of records in a source file.Reply me soon
You can use the COUNT function to get the no of objects in a series.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is this a DataStage TX question?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jvmerc
Participant
Posts: 94
Joined: Tue Dec 02, 2003 12:57 pm

Post by jvmerc »

In TX it's count(value_to_be_counted).

So if all your records are the same and have the name of 'record' the

count(record)

If you have multiple record types in a file record1, record2 and record3 then

sum(count(record1) + count(record2) + count(record3)

You can do the same thing with loops and so on.
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

Yes this is a DSTX question.
Can so called Premium Posters stick to their own forums.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

'Their own forums'? So you own this one? :roll:

And you're a mind reader as well, it seems. If you check vijaya's posting history, you'll find that all of the questions they've posted have been for Server or PX jobs and this isn't the first one that looks like it's here by accident - so asking if it's really a TX question isn't all that unreasonable.
-craig

"You can never have too many knives" -- Logan Nine Fingers
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

Craig,
If this is a DSTX forum then we really shouldn't be getting answers to other Datastage products posted here.
I think you misunderstand the meaning of 'own'- I refer to areas of expertise.
And the question is a perfectly good DSTX one.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I didn't misunderstand anything. Actually, you shouldn't be getting questions to other DataStage products posted here. However, it happens, so we double-check if it's unclear. Some of us read all forums. I don't expect to answer anything here but do enjoy learning whatever I can from the exercise. And if you've been out in the other forums, you'd see there's been an abundance of people posting in the 'wrong' forum. Abundance.

And you need to cut people some slack. If you come here because you are sitting on the other end of an RSS feed for example, it's not always obvious which forum you've ended up in. Or if you come from the Home page via the New Posts functionality, for that matter. You can accidentally answer a generic question with an answer from the wrong product. Too bad there isn't a Job Type marker of 'TX' for posts, that would help.

And while the question is a 'perfectly good DSTX one', it's generic enough it's a perfectly good Server one. Or a perfectly good PX one.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jvmerc
Participant
Posts: 94
Joined: Tue Dec 02, 2003 12:57 pm

Post by jvmerc »

Please let's end this non-sense...

If you are out here a lot you know which forums you are in when reading the questions.... If the question is a DSTX question it's appropriate to answer it here...... If not, it is 'inappropriate' to answer it here and the questioner should be referred to a more appropriate forum to get the best answers possible. Getting a non-DSTX question answered here by a well-meaning TX expert could send one down a bad path. The reverse is true also....

I've been registered with this site for a few years but come infrequently because it's poorly managed as far as what questions get posted where etc... There are other, more clearly defined or monitored sites available for many of these topics. Therefore, you are less likely to get misleading information.

Again.... this is a silly argument.... lets just try doing what the site was intended for to the best of our abilities....

Always appreciate your input janhess, Craig not familiar with you maybe on other forums you go by other names.... Luck to you both!
Last edited by jvmerc on Sun Aug 13, 2006 7:38 pm, edited 1 time in total.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Scurry off Craig. Take your almost 7000 posts on this site and crawl back into your hole. You and the rest of the so-called "Premium Posters" don't rule here. Beat it, and don't let the door swing back and crack you where God split you. Your mother was a hamster, and your father smelt of elderberries! Come back and I'll taunt you some more! Now go away before I taunt you a second time.


:roll:
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not to worry, I scurried off back to my hole three days ago. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

How about renaming this forum WebSphere Transformation Extender as the product is now known. It might make it easier for the datastage people to find the right home.
Craig I wasn't trying to upset you but it would by nice to have the TX forum for TX questions and answers.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Make the request over in the Site Forum, the kind folks running this site are very open to suggestions. I've already asked about the possibility of adding a new Job Type value so your posts can be specifically marked as 'TX'. Should help cut down on the confusion as well.

Transformation eXtender, eh? I wasn't aware what 'TX' actually stood for and never looked it up. Familiar with the usetawas name - Mercator - as we'd looked at the product several years ago. :wink:
-craig

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