Page 2 of 2

Re: Count of bytes between strings

PostPosted: Fri Oct 29, 2010 1:11 am
by skolusu
jnkarthik wrote:Thanks Mr. Kolusu,
The output what you are producing is what I required exactly.
I tried your sample and it is working but I have 29 groups in my input file but the output produced only for one group. May be it has not found the searching criteria properly not sure why it is? Since it has taken the complete file, It produced me the complete file byte count instead of the group. Could you tell why this is so?


The job I have shown assumes that the group starts with X'5044462D312E330A' at position 5 . So you need to check if that is true for all the 29 groups. I can't tell you why the job doesn't work without knowing how your data looked like ( please don't post the unprintable characters dump) .

If you still have problems , Show me the complete SYSOUT from the job you ran.

Re: Count of bytes between strings

PostPosted: Fri Oct 29, 2010 1:55 pm
by jnkarthik
Hello Kolusu,
I was trying for the first example (only now Sorry I was keep trying for my requirement straight away with your code sample i did not try for the first sample by myself, sorry for that).) even for that I am getting output for only one group. It is VB file only.
Input file data is
xyz
abcdedfgggggggggg
abccccccddddddddddddddddef
aaaaaaaaaaaaaaaaaaaaa
xyz
bbbbbbbbb
bcvcfdggggggggggggggggggggg
ddddddddddddd
vdffdfvb
xyz
ccccccccccccccddddddddddddddd
eeeeffffggggggggg
eeeeeeeefffff

I have used your code as it is and the output is as below
TOTAL BYTES FOR GROUP XYZ 189

Let me know if you require any further information.

Re: Count of bytes between strings

PostPosted: Tue Nov 02, 2010 12:42 am
by jnkarthik
Hello Mr Kolusu,
I have written a COBOL code to identify the size but wondering why this has failed for me. If you got any clues let me know.\
If you require the File formats, etc., what I am using let me know i will provide the details.