Class05.2_NX_SQL_COBOL_DESIGN_BONUS4

Class05.2_NX_SQL_COBOL_DESIGN_BONUS4 - CLASS 5 THE ELEGANCE...

Info icon This preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
CLASS 5 THE ELEGANCE OF STRUCTURED PROGRAMMING [SQLCOBOL04.CBL] BCIS 4620 DR. BECKER
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
000-MAIN-CONTROL ERROR Detect REPORT HEADINGS STOP RUN 100-OPEN-FILE 360-FETCH-LIST-VEMP DECLARE VCUR … VEMP OPEN VCUR; FETCH FIRST CLOSE VCUR 400-PROGRAM-END ROLLBACK WORK CLOSE FILES 900-DBERROR PERFORM 400-END STOP RUN COMMENTS: BEFORE CONTROL BREAKS 365-PRINT-AND-GET1 PRINT RECORD FETCH NEXT RECORD 367-PRINT-A-LINE SQLCOBOL4.CBL BEFORE RED denotes Embedded SQL
Image of page 2
STRUCTURE PROGRAMMING MAIN MODULE PERFORM BEGINNING PERFORM MIDDLE … UNTIL BREAKS PERFORM END STOP RUN BEGINNING INITIAL ACTIONS SETTINGS FIRST TIME EVENTS HEADINGS MIDDLE LOOP: GET & PRINT REPEATING ACTIONS, EVENTS & SUBTOTALS REPORT BODY END FINAL ACTIONS FOOTERS CLOSE
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
BEGINNING: 100-OPEN-FILE(S) 100-OPEN-FILE OPEN FILE [INPUT] REPOUT [READ RECORD] SET REPORT CONTROLS PAGE=1 TOTALS=0 REPORT HEADING RETURN
Image of page 4
ANATOMY OF CONTROL BREAKS, TOTALS, & COUNTERS BREAKS COUNTERS SUBTOTALS REPORT-BREAK: SQLCODE=+100 TOTAL-DOLLARS TOTAL-COUNTS TOTAL-LINES PAGE-BREAK: WDEPT SUBTOT-DOLLARS SUBTOT-COUNTS SUBTOTAL-LINES GROUP-BREAK: WGROUP GTOT-DOLLARS GTOT-COUNTS GTOT-LINES
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '08
  • staff
  • ROLLBACK WORK, PRINT RECORD FETCH, 400-PROGRAM-END ROLLBACK WORK, 360-FETCH-LIST-VEMP DECLARE VCUR, 000-MAIN-CONTROL ERROR Detect

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern