Sequential Update Assignment Notes Please use speaker notes for additional information!

Slides:



Advertisements
Similar presentations
How to Create a Local Collection
Advertisements

ROSI Express Training: Adding Additional Instructors to a Course Meeting Section.
Using a database to organize information
Adding an Address To avoid adding duplicate addresses, Always use Find first. If you cannot find an address then add it. A warning should display if an.
Page 1 Returns Receivings By MIS Department. Page 2 The Returns Process When a store or customer wants to return goods, they are supposed to contact the.
NWOCA USER CONFERENCE NOVEMBER 2, 2012 POWERSCHOOL FEES.
Scheduling Instructions- Elementary Working in the Mainframe to schedule students for the Esembler Grade Book Program If you wish to view a printable version.
12-1 Structured COBOL Programming Nancy Stern Hofstra University Robert A. Stern Nassau Community College James P. Ley University of Wisconsin-Stout John.
Chapter 13 File Structures. Understand the file access methods. Describe the characteristics of a sequential file. After reading this chapter, the reader.
12- 1 Chapter 12.  Single-Level OCCURS Clauses  Processing Data Stored in Array  Using OCCURS Clause for Table Handling  Use of SEARCH Statement 
Enrolment Services – Class Scheduling Fall 2014 Course Combinations.
XML, DTD, ENTITY Please see speaker notes for additional information!
The DATA DIVISION Chapter 3. COBOL Data Organization Field - group of characters forming a meaningful unit or basic fact –Characters in a name or digits.
3-1 Chapter 3. To familiarize you with  Ways in which data is organized in COBOL  Rules for forming data-names  Defining input and output files in.
Lecture 6 Instructor: Craig Duckett. Assignment 1, 2, and A1 Revision Assignment 1 I have finished correcting and have already returned the Assignment.
XML and DTD Please you speaker notes for additional information!
Edit Programs Please use speaker notes for additional information. Example: payedit.cbl payedit.cbl.
13-1 COBOL for the 21 st Century Nancy Stern Hofstra University Robert A. Stern Nassau Community College James P. Ley University of Wisconsin-Stout (Emeritus)
Sequential Files Chapter 13. Master Files Set of files used to store companies data in areas like payroll, inventory Set of files used to store companies.
Explanation of SAMPLEIF (if88in1.cbl or if88in1.html) Please use speaker notes for additional information!
Order Entry Program Please see speaker notes for additional information!
12- 1 Chapter 12.  Single-Level OCCURS Clauses  Processing Data Stored in Array  Using OCCURS Clause for Table Handling  Use of SEARCH Statement 
Label Assignment Please use speaker notes for additional information!
13-1 Sequential File Processing Chapter Chapter Contents Overview of Sequential File Processing Sequential File Updating - Creating a New Master.
INTRODUCTORY GUIDE TO SURPLUS LINE INFORMATION PORTAL 2.0 (SLIP) CALIFORNIA’S ELECTRONIC FILING SYSTEM THE SURPLUS LINE ASSOCIATION OF CALIFORNIA SLIP.
Online Catalog Tutorial. Introduction Welcome to the Online Catalog Tutorial. This is the place to find answers to all of your online shopping questions.
To register for classes, select “Register for Sections” under the registration section of the Credit Students Menu.
13- 1 Chapter 13.  Overview of Sequential File Processing  Sequential File Updating - Creating a New Master File  Validity Checking in Update Procedures.
Master File Update Processing. Objectives On completing this section you should be able to: w Distinguish between online processing and batch processing.
Analysis of SAMPLE1.CBL Please check speaker notes for additional information!
Chapter 11: Sequential File Merging, Matching, and Updating Programming Logic and Design, Third Edition Comprehensive.
VSAM ESDS and RRDS Department of Computer Science Northern Illinois University September 2005 Some of the illustrations are from VSAM: Access Method Services.
PHP with MYSQL Please use speaker notes for additional information!
Random update Please use speaker notes for additional information!
Two file sequential file processing (maximum 1 record per id on each file) Please use speaker notes for additional information!
Sequential Processing to Update a File Please use speaker notes for additional information!
ONLINE COURSE REQUEST HIGH SCHOOL IMPLEMENTATION JANUARY 2016.
How to CORRECTLY Complete a TEASE Access Request Form.
Texas Assessment Management System STAAR Alternate Manage Teacher Assignments.
Week 1 Intro to the Course Intro to Databases.  Formerly ISP 121  “Continuation” of LSP 120 concepts  Topics include: ◦ Databases ◦ Basic statistics.
Visual Basic - Break Processing
Processing multiple files
Homework 1 Hints.
Standard Operating Procedure
eSchoolPLUS District Data Coordinator May Webex
Create a Study Abroad Section
Required Data Files Review
ONLINE COURSE REGISTRATION
last modified 3/1/12LL->printed November 2012
HIGH SCHOOL IMPLEMENTATION
How to Build a Course Using SSASECT in INB.
Please see speaker notes for additional information!
MODULE 7 Microsoft Access 2010
NextGen Purchasing Calendar Year End 1099 Process
Chapter 3 The DATA DIVISION.
Databases Lesson 2.
Please use speaker notes for additional information!
Programming Logic and Design Fourth Edition, Comprehensive
Minor, Intermediate and Major Breaks
Benchmark Series Microsoft Word 2016 Level 2
Changing Your Schedule
Data and Flowcharts Session
Searching an Array or Table
Please use speaker notes for additional information!
Marvel College Appendix A.
Data and Flowcharts Session
Data and Flowcharts Session
Please use speaker notes for additional information!
Current Year Scheduling - Utilities
Presentation transcript:

Sequential Update Assignment Notes Please use speaker notes for additional information!

Sequential Old Master (SEQMST99.DAT) Identification Number Title Code Name (last/first m) Street Address City State ZIP Total amount due Total amount paid Major 94 Number of Courses Course Course Course Course Course Course Course 7 SEQMST99.DAT Doe/John R 123 Elm Street Braintree MA CI5ACC11CIS11ENG11MTH31HST21 First record on the file.

Doe/John R 123 Elm Street Braintree MA CI5ACC11CIS11ENG11MTH31HST Richards/Mary 15 West Street Braintree MA BU2ENG11CIS Anderson/Susan 345 Main St Hingham MA CI4CIS51CIS61CIS53MTH Brooks/William 43 Elsbree Street Fall River MA CI3CIS61CIS53MTH Ames/Jennifer 57 Avenue F Hingham MA LN4CIS11RUS11ANT11LIN Daniels/Stephen 345 Gales Lan Hingham MA PL3POL31CIS11HST21AMC Grant/Martha 5325 Elm St New Bedford MA CI7CIS07CIS51CIS61CIS53MTH31ENG11ACC Sousa, Linda 352 Durfee St Fall River MA CI1CIS Fox/William 34 East River Rd Fall River MA CI5CIS51CIS61CIS53CIS07ACC Rogers/Matthew 32 Main St Hingham MA BU3ACC11CIS11ENG Turner/Kathleen 34 East St Weymouth MA CI4CIS61ACC11ENG11CIS Brown/Emily 23 Pleasant St Weymouth MA CI5CIS51CIS61ACC11ENG11MTH Stretton/Mary 134 Pleasant St Stoughton MA LB2ENG11MTH Richardson/Al 324 Oak St Fall River MA ET6ETK11CIS11ENG11MTH31PHY01CHM Adams/John 23 Presidents Rd Quincy MA PL1HST Gardner/Susan 43 Peach St Fall River MA CI4CIS11ENG11MTH31ACC11 SEQMST99.DAT

ACC11 4C Tremont St Weymouth MA C ENG11 4C MTH31 4C CIS61CIS56 4C CIS10 4C Bryant/Linda 12 Main St Hingham MA CI2CIS11ACC11 A D C CIS11 4C West/Ann 45 Pleasant St Fall River MA CI5CIS56CIS22CIS12ENG12ACC12 A Jameson/Sandra 345 East St Weymouth MA CI3CIS12CIS22CIS07 A D CI3CIS61CIS53ENG11 3C HST20 4C HST20 4C SCI17 4C SPH11 4C ENG12CIS11 4C CIS56 4C Adams/Jonathan 1C SPH11 4C TRANS99.DAT

ADD Transaction TRANS99.DAT ADD Transaction Transaction - ADD TRANSACTION LAYOUT Identification Number Title Code Name (last/first m) Street Address City State ZIP Total amount due Total amount paid Major 94 Number of Courses Course Course Course Course Course Course Course Blank 131 Record Action Code West/Ann 45 Pleasant St Fall River MA CI5CIS56CIS22CIS12ENG12ACC12 A Sample add transaction.

TRANS99.DAT DELETE Transaction TRANS99.DAT DELETE Transaction Transaction - DELETE TRANSACTION LAYOUT Identification Number Blank 131 Record Action Code D The sample delete transaction has only an identification number and a record action code in 131 that contains a D.

Transaction - CHANGE 1 TRANSACTION LAYOUT Identification Number Title Code Name (last/first m) Street Address City State ZIP Blank 130 Transaction Code 131 Record Action Code TRANS99.DAT CHANGE 1 Transaction TRANS99.DAT CHANGE 1 Transaction Tremont St Weymouth MA C Sample Change 1 transaction.

Transaction - CHANGE 2 TRANSACTION LAYOUT Identification Number Total amount due Total amount paid Blank 130 Transaction Code 131 Record Action Code TRANS99.DAT CHANGE 2 Transaction TRANS99.DAT CHANGE 2 Transaction C Type 2 transaction.

Transaction - CHANGE 3 TRANSACTION LAYOUT Identification Number Major 11 Number of Courses Course Course Course Course Course Course Course Blank 130 Transaction Code 131 Record Action Code TRANS99.DAT CHANGE 3 Transaction TRANS99.DAT CHANGE 3 Transaction CI3CIS61CIS53ENG11 3C This is transaction 3 which is used to change the major and the schedule. } OR } ALL -CRS }

TRANS99.DAT CHANGE 4 Transaction TRANS99.DAT CHANGE 4 Transaction Transaction - CHANGE 4 TRANSACTION LAYOUT Identification Number 9 Course Action Code Old Course New Course Blank 130 Transaction Code 131 Record Action Code ENG11 4C MTH31 4C CIS61CIS56 4C Change 4 transactions are used when a student adds, drops or changes an individual course.

Describing the transactions Alternative #2: FD TRANS-FILE… 01 ADD-TRANS. 05 TID 05 … 05 TRAN-CD… 05 REC-ACT-CD… 01 CHANGE1-TRANS. 05 … 01 CHANGE2-TRANS. 05 … ETC. Alternative #1: FD TRANS-FILE… 01 TRANS-REC. 05 TID PIC X(8). 05 FILLER PIC X(121). 05 TRAN-CD PIC X. 05 REC-ACT-CD PIC X. … WORKING-STORAGE SECTION. 01 ADD-TRANS. 05 … 01 CHANGE1-TRANS. 05 … 01 CHANGE2-TRANS. 05 … ETC.

Describing the master work area Identification Number Title Code Name (last/first m) Street Address City State ZIP Total amount due Total amount paid Major 94 Number of Courses Course Course Course Course Course Course Course 7 In designing the master work area, be careful to layout the information so it can be used effective.y. The main consideration should be the layout of the seven courses. If you name them individually then you are constantly going to have to refer to them by their individual name. This can be very cumbersome if you develop any logic where you want to loop through the courses to check their contents. You will probably want to be able to access the full 35 characters of the courses with a change 3. With a change 4 you are going to need to check each of the course fields individually so you might consider setting them up as a table.

Logic flowchart of loop Loop MID < TID Write routine Read old master YN MID =TID Change Routine Read transaction Y Y Y N N Delete Note Delete Read transaction Add Error Read transaction Read old master YN Add Routine Read transaction Change Error Read transaction Delete Error Read transaction Y N N

Change 1 & 2 For change 1 and change 2, you are doing classic changes similar to the routine in the sample program. If there is data in the field, the change should be made. I did not put in any sample records that included a hyphen in the last character of the field calling for the data in the field to be deleted. However, for extra credit, you can include this code even though there is no sample data to use to test it. Example: IF NAME-TRAN NOT = SPACES NEXT SENTENCE ELSE IF LAST-CHAR-NAME-TRAN = “-” MOVE SPACES TO MSTR-NAME-WS ELSE MOVE NAME-TRAN TO MSTR-NAME-WS END-IF

Change 3: In change 3, you are checking major, number of courses and the group of courses. If a transaction 3 has been submitted it can change the major, the number of courses or all of the courses (the entire schedule). Think about this when you are defining the course part of this layout. Transaction - CHANGE 3 TRANSACTION LAYOUT Identification Number Major 11 Number of Courses Course Course Course Course Course Course Course Blank 130 Transaction Code 131 Record Action Code } OR } ALL -CRS }

Change 4: Transaction - CHANGE 4 TRANSACTION LAYOUT Identification Number 9 Course Action Code Old Course New Course Blank 130 Transaction Code 131 Record Action Code Examples: ENG11 4C MTH31 4C CIS61CIS56 4C Course Action Code 1 means that the course to be added should be in the new course field. Course Action Code 3 means that the course to be delete should be in the old course field. Course Action Code 2 means that the course needs to be changed. The current course that is to be replaced should be in the old course field and the new course that will replace it should be in the new course field.

ENG11 4C Transaction - Change 4: Master work area: Anderson/Susan (after) CI5CIS51CIS61CIS53MTH31ENG Anderson/Susan (before) CI4CIS51CIS61CIS53MTH31 Change 4: Course Action Code = 1 Change 4: Course Action Code = 1 ENG11 must be compared with each of the courses in the master work area. If a match is discovered then ENG11 is already there and the course could not be added to the list. If no match is found, the course can be added. In this example ENG11 was added as the fifth course - note that the number of courses was changed to 5. Once the number of courses has been increased (in this case to 5), the number of courses can be used as the subscript to move ENG11 into the the appropriate slot.

Master work area: Anderson/Susan (after) CI4CIS51CIS56CIS53MTH Anderson/Susan (before) CI4CIS51CIS61CIS53MTH31 Change 4: Course Action Code = 2 Change 4: Course Action Code = CIS61CIS56 4C In this example, the Course Action Code = 2 which means that we want to change the old course to the new course. CIS61 is the old course and CIS56 is the new course. I need to search and find CIS61 - if it is not there, I cannot do the change. Once I have found it, I need to remember the location so I can do the replacement. However, first I have to make sure that the student is not already taking CIS56. Once this has been determined, I can do the replacement. The remembered location of CIS61 is where CIS56 is placed. There is no change to the number of courses.

Master work area: Anderson/Susan (after) CI3CIS51CIS61CIS Anderson/Susan (before) CI4CIS51CIS61CIS53MTH31 Change 4: Course Action Code = 3 Change 4: Course Action Code = MTH31 4C In this example, the Course Action Code = 3 which means that we want to delete a course. First we have to find MTH31 and then we have to space it out and decrease the number of courses by 3. This becomes a trickier problem if MTH31 is not the last course because you do not want to leave embedded spaces in the course list. I will deal with this on the next slide. MTH31 has been replaced by spaces and the number of courses has been reduced to 3.

Examples: ENG11 (add a course) 4C MTH31 (delete a course) 4C CIS61CIS56 (change a course) 4C Master work area: Anderson/Susan (after change) CI4CIS51CIS56CIS53ENG Anderson/Susan (after delete) CI4CIS51CIS61CIS53ENG Anderson/Susan (after add) CI5CIS51CIS61CIS53MTH31ENG Anderson/Susan (before) CI4CIS51CIS61CIS53MTH31 Change 4 All three transactions Change 4 All three transactions First ENG11 was added and the number of courses was increased to 4. Then MTH31 was deleted and the number of courses went back to 4 and finally CIS61 was changed to CIS56 and the number of courses stayed the same. The addition of ENG11 happened first. The next transaction was read which called for MTH31 to be deleted from the same record. I do not want to leave the spaces in the slot so I move ENG11 to where MTH31 was when I do the delete. Finally the next transaction is read and CIS61 is located and replaced by CIS56.