CONFIGURATION SECTION
This section is optional. It describes the Computer sy tern used for compiling the program and for executing it. For the purpose there are two paragraphs in thh section.
SOURCE-COMPUTER.
OBJECT-COMPUTER.
The purpose of the former is to give the name of the computer to be used for program compilation and the later is for the one to be used for its executiQn. Being paragragh names, it must be written starting in Margin-A and immediately followed with a period. The entry with in each para is to be the name of the computer system. it is used only for documentation and as such anything can be written within these paras.
SOURCE-COMPUTER. IBM-PC
OBJECT-COMPUTER. IBM-PC
These are the only two entries within the CONFIGURATION SECTION. It should be followed with INPUT-OUTPUT SECTION as follows:
ENVIRONMENT DIVlSIN
CONFIGURATION SECTION.
SOURCE-COMPUTER.IBM-PC.
OBJECT-COMPUTER.IBM-PC.
INPUT-OUTPUT SECTION.
There is another optional paragraph in the CONFIGURATiON SECTION named SPECIAL-NAMES.
INPUT- OUTPUT SECTION
This section is a must to be given if the user is using any file within his program for the purpose of input or output e.g., if he is using a disk file for reading the data and printing it on the printer, he has to use this section to describe these files. This section has two paragraphs:
FILE-CONTROL
• 1-0-CONTROL
This Para can be skipped i7the user does not wish to use any file in his program. A simple program segment is given below:
1NPUT-OU’TPUT SECTION
FILE-CONTROL
SELECT MARKS-FILE ASSIGN TO DISK
ORGANIZATION IS LINE SEQUENTIAL
ACCESS IS SEQUENTIAL
FILE STATUS IS STA’US-C0DE
SELECT RESULT-FILE ASSIGN TO PRINTER. 1-0-CONTROL
SAME AREA FOR
MARKS-FILE
RESULT-FILE
Data Division also has two main sections:
1. The FILE SECTION, as the name indicates, is used to describe the format of data in all the files, whether input or output files. This section is optional. If the program is not using any file this section can be skipped. It must have entries for all the files being used.
2. The WORKING-STORAGE section on the other hand is used to define th data fields required over and above the ones defined in the FILE SECTION. These may be required to stor some intermediate working values or some constants used in the program.
No comments:
Post a Comment