Unformatted text preview:

System Flow ChartThe Ordering of Records for Sequential UpdatesSequential File Processing Main sections:Systems overview of sequential file processingSequential File Updating - Creating a new master fileValidity checking in update proceduresUpdate procedures with multiple transaction records for each master recordSequential file updating - rewriting records on disk - in place.Matching files for checking purposesSystems Overview of Sequential File ProcessingMaster files:. master file is a major collection of data pertaining to a specific application.examples: payroll; accounts receivable; accounts payable; billing, inventory, ...Storage:. Typically, master files stored on disk.qty of info; read/write speed; flexible record size . Used to be tapes... Tapes nowadays: backup, archiving; history fileseod, eom, eoy batch statistics, recovery…Access - and applicability to applications....disk: randomsequentialtape:sequentialAon-line@ applications and batch processing...The application will dictate whether the file design should be set up for sequential or random processing.1This chapter: Sequential file processing of master files.Designing the Master File:1. The first field(s) should be key fields that uniquely identify the record. (e.g., ssan, part no, account no, etc.)2. Key fields, where possible, should be numeric, rather than alphanumeric such as name, address, etc.(more of a tradition rather than a Aneed.@)3. Secondary fields should follow primary fields in a record. (secondary field, such as rank (which may not be unique) within a higher ordered field, such as "organization" or "college" (recall the UNF faculty example...)4. Fields should appear in the master file in "order of importance," or else grouped by similarity.5. Ensure fields are large enough to accommodate the data.6. Use encoded fields where possible, such as, m for married, s for single, d for divorced, w for widowed, etc.Creating a Sequential Master FileFiles are "created" (or Aconverted@) only one time; then "updated." The validity of the data must be ensured.Reports: . audit trails . statistics.... . error lists / change lists / transaction registers 2Creating a Transaction FileTransaction files are records that represent "changes" to the master files.. called Atransactions@. transactions must be Avalidated@. don=t want to Agubber up@ your master file!. gigoUpdating a Master FileUpdating the master file with the transaction file called: "updating"Afile maintenance@Our technique called "sequential update" of master file Assumption here is that both master file and transaction file records are in the same sequence. This is a must!!!Called: "batch processing."vis’ a vis’: interactive processingmisnamed: Aon-line@ processing...Reporting from a Master FileSequential file updates are normally "scheduled." Run on a periodic basis: daily, end of day, end of month, etc.Other kinds of updates: "on demand;" run Aas required@much more later. (next major topic....)Report printing is generally of one of three types, Detail reports, Exception reports, Summary reports.Sequential File Updating - Creating a new master fileTypically three files used1. Current master file (old-master)2. Transaction file3. New master file (new-master)4. Control listing (print files, audit trails)System Flow ChartDiscuss inputs and outputs. ACurrent@ until update.. New master is now current; Old master = backup + trans file.. Dispositions...(different users; archiving.....). New master recreated, if necessary.. StatisticsStatistics:OldMasterFileTransactionFileReportsNewMasterFileTypical Reports Error Reports Change Lists Master File RegisterSequentialFile MasterUpdate ProgramIn addition to:number of transaction records processednumber of errors:number of new accounts:total of transaction amounts:Could add:number of addsnumber of deletesnumber of changestotal transaction recordstotal new master file records===================================================The Ordering of Records for Sequential UpdatesRecognize: . Master file is current until the completed update.. Transaction file is a batch of records - used to update master file to produce new master file. New master file will contain the mixed old master file plus the transaction file records ... sort of...Both files must be in order by the same key field(s).Key field(s) must uniquely identify desired records in the update algorithm, Records are identified and matched on the key fields.Let=s consider procedures used for sequential updatesExample:Assume: transaction file records have Aa@ Ac@ Ad@ transaction codes. (could be other codes, such as 1,2,3)(Will have some code - 1,2,3 or some Aidentifiable value.@)tnx omf nmfc 200 100a 220 200a 260 210d 290 215 <eof> 220240260290 300...Always comparing . Key of transaction rec to key of master rec.. Action based on transaction code and Amatch@The Use of High-Values for EOF ConditionsCannot assume both files will hit "at end" at same time.EOF encountered on transaction file encountered first.what does this mean?what should we do?EOF on master file encountered first.what does this mean?what should we do?Enter: figurative constant: "high values". (recall the others??). What are "high values" - all 1-bits. Move to Akey field@. All compares will be low!!. Only when both files are high values, will main driver gain control again.... Standard routines will continue until other file is at end.. Sometimes called "flush routines."Note: normally only a small percentage of transactions will NORMALLY be run against a master file.How to do this?eof transaction file: . move Ahigh-values@ to key-field in trans-record. => all records in old master file compare low.. => copy old master records to new master file.. copy until eof (old master).eof master record?. Move Ahigh-values@ to key-field in master record. All transaction file records left will compare low. Add the records. (they=d better be Aa@!!)Example:tnx omf newc 200 180a 220 200<eof> 230 260280 300 <eof>Example:tnx omf nmf c200 200a300 220a310 <eof>a320 a440<eof>Bottom line for Sequential File UpdatesAlways have:1. Hit condition desired condition2. Error condition this Awill@ arise and must be accommodated3. Read-more condition causes us to continue readingConsider:NMF = new master file OMF = old master


View Full Document

UNF COP 3531 - Sequential File Processing

Download Sequential File Processing
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Sequential File Processing and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Sequential File Processing 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?