Flowcharts for File Processing
Computer applications today are composed of complex processes to ensure that data is stored and may be manipulated as desired. File processing is the strategy and magic behind these to ensure that computer applications can work and store data the way we want it to. To begin with, a file is something that consists of what are known as records. These records contain information about one particular subject, such as a person or a product. In a record is a variety of corresponding fields. Fields are different categories that the subject is recorded within, such as a name, position or price for a product.
In the world of programming, there are two conventions mainly used in file processing. These two conventions are called fixed field layout and variable field layout. In a fixed field layout, the size of each field must remain the same regardless of the data and context inputted in that field. In the case of blank entry, spaces are usually used to accommodate the predetermined size of the field.

A variable field layout may occupy as much characters as required separated by what is known as a delimiting character such as a comma or colon. Both conventions have their advantages and disadvantages and are applied in different settings in our everyday programming world.

In structured programming, we learnt the importance of structure and organization in a complex programming setting. In file processing, we see organization in database systems to ensure that our data is stored safely and that the program is essentially working. In addition to the basic structure of fields and records, a key field is used to identify a particular record. A key field is usually a name or number. Typically, key fields are organized in sequential order, either ascending or descending. Ascending is more often used. Ascending is when the value of key field is larger than the preceding one while descending describes the other way around. As you will learn later on, key fields are very important and play an important role in file processing and flowcharting.
Information in file processing requires a device attached to the CPU so that it can be read and processed. A disk drive or a tape drive is most commonly used for this purpose. Information is read and stored sequentially and logic will depend on the device used. A medium is used for storage purposes. An info processing system is responsible for managing many different files. The six most common tasks in file processing is to create files in sequence, merging content, adding records, deleting records, changing files, and generating a report.
So how does file processing have anything to do with flowcharting? System flowcharting assists us with the design aspect of programming. In system flowcharting, a symbol is identified along with a file or program name. A flowline is then drawn to connect the symbols to create a whole processing block representing file processing. System flowcharting is used widely today to assist programmers because of it is a highly effective aid to their work. A system flowchart allows an individual program to be tested and is functioning correctly. It can also be used by operators who run the program to troubleshoot and designers of the system in its design process. Below are a few common symbols used in system flowcharting.

Creating a file involves a machine which will gather the data you input and transforming it into a form which is readable by a machine. This process is commonly done using a terminal or a personal computer. After creating a file, it is essential that the file contains a key field for identification. When flowcharting, The example below illustrates the process of reading an entire record for an input block.

This input block allows a user to write an entire record. It is important to utilize the key field along with the full name of the file to avoid misinterpretation.

Finally, the following will allow the input to be transformed into the master file format prior to becoming an output file. This is important so that a file may be processed completely in the system. This process block includes a series of process depending on the type of file being processed.

Previously mentioned is the importance of sequencing and organization. However, files are not always in order and may prevent file processing from performing correctly. It is very important that a sequence check is executed to determine files which are out of order. In flowcharting, a variable known as HOLD is used for this purpose. Depending on the order of sequence, HOLD is initialized to a certain value (ascending at 0), and the value of key field is entered into that variable as a file is being processed in sequence while performing the check. Since the value of HOLD represents the key field of previous file, files out of order may be determined simply by comparing it to the value of HOLD. The following flowchart demonstrates the use of variable HOLD.

A very common activity in file processing is file updating. File updating means really to be able to alter and change a file through a series of processes and displaying it to the user. For example, a raise in salary or change in marital status will mean altering stored information in a personnel file. One form of file updating is Merging. Merging means to take records of a combination of files and combining it into one. Merging is a process which enters data of files in sequential order depending on its key field. The following flowchart demonstrates this process of file updating.

Once a file is updated, information is not actually altered in the stored file. A copy of the file is created with the changes made and the previous file is either deleted or stored at another area in the record in case of mistakes. There are two kinds of error possible in file updating. These include deleting a non-existing file, or creating a key field of file which already exists. To add or delete files, a transaction code is used while processing the file to determine whether it is to be added to the record, or terminated as a whole.
Data in file processing must be summarized for the user so that it can be used. This is known as report writing. In report writing, data of different fields of files are put together in a readable form by the program. In report writing, intermediate totals are the representation of different variable in a file. Certain data in files needed by the user are drawn out to be used for the report writing process.
With file processing and its use of flowcharting, Database management systems (DBMS) may be created. Databases are really designed for users to have an overall coordinated view and performs as an interface for the user and actul file in the cpu. They are collections of data files. These database systems organize our input so that we may design what we wish to in a simplier way with thse systems. Some common database sytems are Microsoft Access and Filemake Pro.
|