Single control break problem:  Output each data record and count up the number of each type of movie rating and output the number of movies with that rating. 

 

….

Read input-file at end move “no” to are-there-more-records.

Move movie-rate to cb-movie-rate.

Perform 200-movie-routine until end-of-file.

 

__________________________________________________

      

 

Stop run.

 

200-movie-routine.

                                     

       If movie-rate ________________________________________

 

            Perform 300-movie-totals

           

            _________________________________________________

           

            _________________________________________________

 

            Perform 400-write-column-headers

 

       End-if

 

       Add 1 to total-movies

 

       *Move and write movie output data line appropriately*

 

Read input-file at end move “no” to are-there-more-records.

 

      

300-movie-totals.

       move total-movies to total-movies-ed.

       write print-rec from total-movie-line

               after advancing 2 lines.