CSC 203  section 903  COBOL
Notices

Last updated: Saturday 16 June 2001 8:00 PM.  Notice 10) added (at top)

10) Final grades have been submitted and are also posted on the class web page at the Grades link. 

9) Grades through 6 AM this morning, including the final exam, have been posted on the class web page at the Grades link. Those who have not yet turned in assignments 4 and/or 5 may still do so until 6 AM this Saturday, but that is the final deadline. At that point I will submit the final grades to the department to be processed.

1)  To assist you in studying and exam preparation, the following hyperlinks provide the answers to the specific Stern and Stern Structured Cobol text end of chapters questions/exercises referred to.

    a)  pg. 32 (Chapter 1 True/False and General Questions)
    b)  pg. 55 (Chapter 2 True/False and General Questions)
    c)  pg. 95 (Chapter 3 True/False and General Questions)
    d)  pg. 96 (Chapter 3 Debugging Exercises)
    e)  pg. 123-125 (Chapter 4 True/False, General Questions, Interpreting 
                                Instruction Formats, & Debugging Exercises)
    f)  pg. 183-184 (Chapter 5 General Questions)
    g)  pg. 245 (Chapter 6 General Questions)
    h)  pg. 246 (Chapter 6 Debugging Exercises)
    i)  pg. 286-287 (Chapter 7 General Questions 1-10)
    j)  pg. 288 (Chapter 7 Debugging Exercises)
    k)  pg. 327 (Chapter 8 General Questions 5,6,7,8)
    l)  pg. 329 (Chapter 8 Debugging Exercises)

2)  I have been advised that CTI provides a free tutoring service, specific details of which are available at this web site: www.mendelsohn.org/tutors/tutor_search.asp   Select COBOL and a campus and submit the query and a number of tutors, times, and locations will be presented. It looks like a useful resource and I would appreciate it if any of you that use the service let me know how it works out.

3) The following is a collection of sample COBOL programs that may assist you in doing the various class assignments. The first example is the microfocus lab exercise that you have already seen and is formatted to run with Microfocus Cobol. The others are formatted to run on a mainframe (aka legacy) computer but the Cobol logic is identical for both. Note that the 000-MAINLINE 'driver' syntax is different after the first sample program, but the logic works the same. Looking over the two 'driver' formats to try to understand why they work the same way will be helpful to your understanding of programming concepts.
         Introductory Program
         Report Program including headers and totals
         Validation program producing a good report and an error report
         Control Break Program
         Tables: Sample of a hardcoded table
                     Sample of loading a table from an external file & PERFORM...VARYING processing
                     Sample of an INDEXED table, a binary (SEARCH ALL) search and a COPY member
                     Sample of accessing a multi-level table using multiple subscripts

4) All program #1s that I received (in class and via email) have been graded and the grades have been posted to the web site. All the programs were done very well. For confidentiality reasons, the grades are organized by a 'coded' ID which is the last 4 digits of your Social Security Number.

5) Additional grades have been posted. Please let me know if there are any discrepancies.

6)  Here is some important information that will help you with the third programming assignment:

    a. Only validate WHOLESALE > RETAIL potential error if BOTH fields are numeric! 
        Some sample code that would accomplish this:
             IF WHOLESALE-PRICE-IN NUMERIC AND RETAIL-PRICE-IN NUMERIC
                   IF WHOLESALE-PRICE-IN > RETAIL-PRICE-IN
                         MOVE 'Y' TO ERROR-SWITCH
                         ADD 1 TO WS-ERROR-COUNT
                         MOVE 'WHL>RET' TO BAD-RETAIL-MSG
             END-IF
             END-IF.

     b. Only validate ROYALTY-PERCENTAGE > 16 if the royalty input field is numeric!
        Some sample code that would accomplish this:
            IF ROYALTY-PERCENT-IN NUMERIC AND ROYALTY-PERCENT-IN > 16
                    MOVE 'Y' TO ERROR-SWITCH
                    ADD 1 TO WS-ERROR-COUNT
                    MOVE 'OVER 16' TO BAD-ROYALTY-MSG
             END-IF.

    c. Make all the PIC clauses on your error detail line alphanumeric since in many cases
        your program will be moving non-numeric 'junk' into them.

    d. This one is a bit tricky and I'll expand on it in class. Cobol may not let you move 
        numeric data to an alphanumeric field. This is a problem in moving numeric input fields to 
        the PIC X error detail line fields. We solve this by REDEFINING those fields so that they 
        have both a numeric AND an alphanumeric identity and although we use the numeric 
        version for most things, we use the redefined alphanumeric version specifically for moving 
        fields to the error detail line when there is an invalid record. The code looks like this:
            01 INPUT-REC.
                    05 BOOK-NUMBER-IN                                                                                         PIC X(6).
                    05 BOOK-NAME-IN                                                                                              PIC X(24).
                    05 WHOLESALE-PRICE-IN                                                                                 PIC 9(2)V99.
                    05 WHOLESALE-PRICE-IN-X REDEFINES WHOLESALE-PRICE-IN          PIC X(4).
                    05                                                                                                                              PIC X.
                    05 RETAIL-PRICE-IN                                                                                            PIC 9(2)V99.
                    05 RETAIL-PRICE-IN-X REDEFINES RETAIL-PRICE-IN                               PIC X(4).
                    05                                                                                                                              PIC X.
                    05 QUANTITY-IN                                                                                                 PIC 9(4).
                    05 QUANTITY-IN-X REDEFINES QUANTITY-IN                                          PIC X(4).
                    05                                                                                                                              PIC X(6).
                    05 ROYALTY-PERCENT-IN                                                                                 PIC 9(2).
                    05 ROYALTY-PERCENT-IN-X REDEFINES ROYALTY-PERCENT-IN         PIC X(2).

    e. Also regarding the third programming assignment, review the sample program in Stern &
      Stern on pages 447-450 which shows the coded logic for a data validation program.

7) As discussed in class last night, Program 3's that were turned in yesterday (1 week past the due date) will NOT be assessed a 5 point late fee. Those that are turned in next week (2 weeks late) will only be assessed a 5 point late fee. HOWEVER, next Monday is the FINAL DEADLINE for turning in program 3. It will not be accepted for grading after that. If you have not completed the program, turn in what you have for a partial score. Program 4 is still due next week but I will not assess a late fee if it is turned in one week late. However, extra credit will be given for those students who turn it in on time.

8) Please be aware that despite the syllabus notation to the contrary, THERE WILL BE NO CLASS next Monday (May 28) due to the Memorial Day holiday. DePaul University will be closed that day. I have extended the due date for program 4 to Monday June 4 and I will accept it for grading with a late fee until the 'last moment'. Program 5, assigned last night and officially due on June 4 is extended to June 11 and will also be accepted until the 'last moment'. The 'last moment' is approximately 5 days after the final exam by which time all grades must be turned in. As discussed in class, the program 5 assignment has been modified slightly: the Binary Search requirement using the SEARCH ALL command, is no longer required although it could be included for extra credit. We will discuss it at the June 4 class. I have also posted revised class grades on the web site reflecting all programs received through 6AM this (May 22) morning. At our next and last class on June 4 we will cover table processing and program 5 in greater detail and I will also preview the final exam.