Page 1 of 1

Obtaining Character Count in a dataset

PostPosted: Tue Dec 06, 2011 9:58 pm
by RajeshT
Hi Everyone !!

I've searched through the forum and syncsort manual before putting forward this question. I'm trying to obtain the CHARACTER COUNT from a dataset. I'm able to retrieve the RECORD COUNT using the COUNT, SUBCOUNT (COUNT15, SUBCOUNT15) functions but not exactly the character count. I also did a math manually by multiplying the no.of records with the REC SIZE and then by eliminating the no.of SPACES in the file. But i want this function be implemented automatically without manual intervention. Can you help me finding a way obtaining the no.of characters in a dataset (No.of character - total no.of SPACES).

Thank you.
Rajesh.

Re: Obtaining Character Count in a dataset

PostPosted: Wed Dec 07, 2011 11:34 am
by dick scherrer
Hello,

Why should embedded spaces be removed fro mthe count?

Once you have this "byte count", how might it be used? I.E. to support what business requirement.

If we understood why this might be useful, we might be able think of a suggestion.

Re: Obtaining Character Count in a dataset

PostPosted: Wed Jan 04, 2012 10:57 pm
by RajeshT
Hi Dick,

We transmit data to internal and external interfaces of our customer. And also sends the statistics to a VAN and our customer has to pay the amount based on no.of characters to the VAN provider. Off late we've made a change to not to use the VAN facility for a couple of high volume vendors. So customer wanted to cross-verify the statistics of being the high volume vendors converted to a Non-VAN network, to see if that is a reliable option.

Thank you.
Rajesh.

Re: Obtaining Character Count in a dataset

PostPosted: Wed Jan 04, 2012 11:18 pm
by Akatsukami
If your data set is small ("small" being a fuzzy term, but somewhere between a thousand and a lakh records), you can use Rexx; for larger data sets, I'd recommend a compiled language.

Re: Obtaining Character Count in a dataset

PostPosted: Wed Jan 04, 2012 11:34 pm
by enrico-sorichetti
just curious, what makes You think that <blanks> should not behave/considered like the other characters ?

from whatever point of view the IT char count of "ABC" and "A C" is the same,
the blank in the second string is crucial to the information as much as the B in the first string