What is control breaks used for in COBOL programming? Is this used for producing reports or is their any other usage of this control break. Someone provide a brief explanation on this to help me understand this term.
Printable View
What is control breaks used for in COBOL programming? Is this used for producing reports or is their any other usage of this control break. Someone provide a brief explanation on this to help me understand this term.
Yes Control Break in COBOL is used for producing reports. For instance, when the value of control variable changes the sum can be calculated and produced in report. That is using control, break it is possible to produce summary of previous state and set a new state for processing the next set of report. All this would be useful in a company for producing reports in different formats as desired by them.
Great discussion. This really heped me to learn about control break in COBOL. Thanks for such postings.
Hi Timmy,
For an example of COBOL control breaks, please see.
[url=http://www.totemconsulting.ca/control_break.html]Program listings page of Alfred Simpson[/url]
Regards,
Alfred Simpson
control break is used in cobol only for Reports.
and control break is same as the group by clause
suppose My company have two dept and i want reports as per the department
here control break is used see the following example
eg.
Dept Salesperson No Amt of Sales
01 12345 $988.55
01 12346 $3,537.00
01 12347 $34.99
Total for Dept is $4,560.54
02 12222 $9,877.00
02 12234 $87.77
Total for Dept is $9,964.77
Yes, that is a straightforward request for a one level control break.
And easily handled by COBOL control breaks.
Was that a question or a statement?
Alfred.
I had the same questions. Well anyways, thanks for the links to some additional info about the subject.