Search found 5 matches

by Puneethr
Sat May 21, 2016 9:21 pm
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: Count numbers of lines under each header
Replies: 13
Views: 6306

Re: Count numbers of lines under each header

Hello Robert, Anuj, William and Enrico, Thanks a lot to each one of you. With all your inputs I was able to write a Cobol program for the requirement. Highly appreciate the way you guys are helping beginners like me. @Anuj: I am amazed to know that this can be achieved using sort also.Will give that...
by Puneethr
Sat May 21, 2016 3:54 pm
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: Count numbers of lines under each header
Replies: 13
Views: 6306

Re: Count numbers of lines under each header

enrico's idea is a flyer for this, but bear in mind that it is not a panacea for all "we should have thought of that when we designed the file" situations. So, why is the count needed? Why can't it be put on when the file is created? Hi William, The file is an existing one and the structu...
by Puneethr
Sat May 21, 2016 3:50 pm
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: Count numbers of lines under each header
Replies: 13
Views: 6306

Re: Count numbers of lines under each header

Hi Enrico,
Thanks for your reply.Your idea too is great but the only drawback is it will cause more load, as now i will have to read the file twice.This can be kept as a backup option if the table approach doesnt work. Thank you for your suggestion,.
by Puneethr
Sat May 21, 2016 3:47 pm
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: Count numbers of lines under each header
Replies: 13
Views: 6306

Re: Count numbers of lines under each header

Hi Robert,
Thanks again.But this will only write the input records to output right? but I want to put the line count to header. As you said the (number of table entries - 1) would give the line count, but how to update the header before writing? Please let me know your thoughts.
by Puneethr
Sat May 21, 2016 8:51 am
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: Count numbers of lines under each header
Replies: 13
Views: 6306

Re: Count numbers of lines under each header

Hi Robert, Thanks a lot for your response. And the file is fixed block with record length 2024. Maximum headers and lines are not known...according to me there might be 1000 headers in a file and 100lines under each header at the max. I have never used tables or arrays till now. I will try and follo...

Go to advanced search