Page 1 of 1

how to count number of records in source file

Posted: Tue Aug 01, 2006 12:19 am
by vijaya
Hi all,
Please let me know how to count number of records in a source file.Reply me soon

Posted: Tue Aug 01, 2006 2:16 am
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.

Re: how to count number of records in source file

Posted: Tue Aug 01, 2006 3:05 am
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.

Posted: Tue Aug 01, 2006 3:09 am
by ray.wurlod
Is this a DataStage TX question?

Posted: Wed Aug 09, 2006 1:47 pm
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.

Posted: Thu Aug 10, 2006 3:10 am
by janhess
Yes this is a DSTX question.
Can so called Premium Posters stick to their own forums.

Posted: Thu Aug 10, 2006 7:23 am
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.

Posted: Thu Aug 10, 2006 7:44 am
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.

Posted: Thu Aug 10, 2006 8:29 am
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.

Posted: Sun Aug 13, 2006 7:35 pm
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!

Posted: Sun Aug 13, 2006 8:14 pm
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:

Posted: Sun Aug 13, 2006 8:38 pm
by chulett
Not to worry, I scurried off back to my hole three days ago. :wink:

Posted: Mon Aug 14, 2006 3:12 am
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.

Posted: Mon Aug 14, 2006 7:45 am
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: