Example of file-control, COBOL Programming

Example of File-control:

The assign clause assigns a specific physical peripheral device name to a file. The physical peripheral device are machine-dependent. We use the device names READER, TAPE, PRINTER and DISK to mean line printer, card reader, magnetic tape and magnetic disk device respectively.

  An illustration of the FILE-CONTROL paragraph is shown below.

FILE-CONTROL.

        SELECT CARD-DESIGN ASSIGN TO READER

        SELECT PRINTER-FILE ASSIGN TO PRINTER.

This paragraph represents that there are 2 files - CARD-DESIGN & PRINTER-FILE.  The file named CARD-DESIGN is a card file whereas the other is a report file to be printed on the line printer.

 

Posted Date: 10/16/2012 3:43:54 AM | Location : United States







Related Discussions:- Example of file-control, Assignment Help, Ask Question on Example of file-control, Get Answer, Expert's Help, Example of file-control Discussions

Write discussion on Example of file-control
Your posts are moderated
Related Questions
OPEN statement: We know that the processing of a file should start with the execution of an OPEN statement. The file can be opened in any one of the 4 open modes - INPUT, OUTP

COBOL Words: The COBOL word can be formed by using the characters as shown below: 0-9 A-Z (a-z) - (hyphen) The rules below should be hold in forming the COBOL words.

NEGATED SIMPLE CONDITION: Any of the easy condition explained can be preceded by the logical operator NOT. The consequence of placing the operator NOT before an easy condition

IF STATEMENT: The easiest form of the IF statement is  IF condition-1 statement-1 where the condition-1 may be any one from the shown below. When the condition-1

DECLARATIVE and FILE STATUS Clause: The input-output exception condition in the situation of a direct access files can be handled by a declarative procedure in a manner simila

Example of Move corresponding: Consider the DATA DIVISION entries shown below. Suppose it is needed that the data stored in the 4 fields of the PAY_REC should be

Environment Division: The Environment Division is the second division in the COBOL source program. It is mainly machine-dependent . The computer and all the peripheral dev

Example of If- else statement Illustration:   IF   QUANTITY IS NUMERIC AND QUANTITY IS POSITIVE          MOVE ZERO TO ERROR-CODE. COMPUTE SALES VALUE=QUANTITY*RATE

Edit Characters for Numeric Data: The characters below can be used in the PICTURE clause to indicate the editing.   Z    *  $  -    +    CR    DB    .    ,    B    O    /

IF ... ELSE STATEMENT: We are familiar with an easy form of the IF statement. The common form of the IF statement is as shown below: Each of the statement-1 and statem