Structured Cobol Programming with Syntax Guideby Nancy B. Stern
A popular text, noted for its extensive pedagogy and unparalleled ability to crystallize difficult, technical concepts accurately. In this edition COBOL-85 is given primary emphasis and the latest standard, COBOL 199x is highlighted throughout. Contains increased coverage of object-oriented COBOL, pseudocodes and programming on microcomputers. Features all new… See more details below
A popular text, noted for its extensive pedagogy and unparalleled ability to crystallize difficult, technical concepts accurately. In this edition COBOL-85 is given primary emphasis and the latest standard, COBOL 199x is highlighted throughout. Contains increased coverage of object-oriented COBOL, pseudocodes and programming on microcomputers. Features all new practice programs, a novel multimedia slide program and a new, more powerful compiler--MicroFocus Personal COBOL.
- Publication date:
- Edition description:
- 6th ed
- Product dimensions:
- 8.52(w) x 11.04(h) x 1.25(d)
Read an Excerpt
Chapter 1 : An Introduction to Structured Program Design in COBOL 5
Interactive vs. Batch ProcessingSome applications are processed interactively, as the data is transacted, while other data is collected and processed later, in batches. Interactive applications typically accept data from a PC, workstation, or terminal. The input is processed immediately and the output is displayed on a screen and/or printed. This type of interactive processing is used when data must be current at all times and output is required immediately after processing. A Point-of-Sale system in which receipts are computer generated when sales are transacted is an example of an interactive application.
Other applications process large volumes of input at periodic intervals. Payroll procedures used to update the master collection of payroll information prior to printing pay checks are often performed in batch mode at periodic intervals. We will see that COBOL is ideally suited for both interactive and batch processing applications.
When an applications program is written for a specific user it is called a customized program. COBOL is ideally suited as a language for writing customized applications programs. Although we will focus on COBOL for applications programming in this text, we now provide a brief description of another type of applications software called an applications package.
If the tasks to be performed by a program are relatively standard, such as preparing a budget, an applications package might be purchased as an alternative to writing a customized program in a language such as COBOL. Such packages are sold by software vendors. Typically, documentation is provided by the manufacturer in the form of a user's manual, which explains how to use the package. For example, Lotus for Windows is a widely used package for applications such as budgeting, scheduling, and preparing trial balances.
If a package exists that can be used as is for an application, purchasing it will almost always be cheaper and easier than writing a customized program. But if an application has special requirements, then writing a customized program may be preferable to modifying an existing package.
MACHINE LANGUAGE PROGRAMSAll programs to be executed by the computer must be in machine language. It would be very tedious and cumbersome for the programmer or software developer to code instructions in this form. He or she would need to reference actual addresses or locations in memory and use complex instruction codes.
SYMBOLIC PROGRAMSThere are numerous symbolic programming languages that can be translated into machine language. COBOL is one such language that is used extensively for commercial applications. Other symbolic programming languages include Visual Basic, Pascal, and C+ +.
THE APPLICATIONS PROGRAM DEVELOPMENT PROCESSThe process of developing programs is similar for all applications regardless of the symbolic programming language used. An overview of the steps involved in the program development process follows. Each of these steps will then be discussed in detail.
PROGRAM DEVELOPMENT PROCESS1. Determine Program Specifications Programmers, along with systems analysts who are responsible for the overall computerized design of business procedures, work with users to develop program specifications. Program specifications include input and output layouts describing the precise format of data along with the step-by-step processing requirements for converting input to output.
2. Design the Program Using Program Planning Tools Programmers use design or program planning tools such as flowcharts, pseudocode, and hierarchy charts to help map out the structure and logic of a program before the program is actually coded.
3. Code and Enter the Program The programmer writes and then keys or enters the source program into the computer system using a keyboard.
4. Compile the Program The programmer makes certain that the program has no rule violations.
5. Test the Program The programmer develops sample data and uses the program to operate on it to ensure that processing is correct.
6. Document the Program The programmer writes procedure manuals for users and computer operators so they can run the program on a regularly scheduled basis.
Most novices believe that computer programming begins with coding or writing program instructions and ends with program testing. You will find, however, that programmers who begin with the coding phase often produce poorly designed or inadequate programs. The steps involved in programming should be developmental, where coding is undertaken only after the program requirements have been fully specified and the logic to be used has been carefully planned.
Moreover, there are steps required after a program has been coded and tested. Each program must be documented with a formal set of procedures and instructions that specify how it is to be used. This documentation is meant for (1) those who will be working with the output, (2) computer operators who will run the program on a regularly scheduled basis, and (3) maintenance programmers who may need to make modifications to the program at a later date.
DETERMINE PROGRAM SPECIFICATIONSWhen a company decides to computerize a business application or information system such as payroll or accounts receivable, a systems analyst or a software developer is typically assigned the task of designing the entire computerized application. This systems analyst works closely with users to determine such factors as output needs, how many programs are required, and input requirements. A user is the businessperson who, when the application is computerized, will depend on or use the output.
When a systems analyst decides what customized programs are required, he or she prepares program specifications to be given to the programmers or software developers so that they can perform their tasks. Typically, the program specifications consist of:
1. Record layout forms to describe the formats of the input and output data on disk or other storage medium. Figure 1.1 illustrates two examples of record layouts. (We will use version (b) for most of our illustrations.) They indicate:
2. Printer Spacing Charts for printed output. Printed output requires a format not typically needed for other types of output:
and post it to your social network
Most Helpful Customer Reviews
See all customer reviews >