0% found this document useful (0 votes)
32 views2 pages

Seq Text

Uploaded by

Abi Dev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views2 pages

Seq Text

Uploaded by

Abi Dev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

ENVIRONMENT DIVISION.

INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT [OPTIONAL] <logical file name> ASSIGN TO <hardware>
[ORGANIZATION IS [LINE ] SEQUENTIAL]
[ACCESS MODE IS SEQUENTIAL]
[ RESERVE int AREA / AREAS ] ---> default buffers are 2
[FILE STATUS IS dataname].

hardware can be

DISK
PRINTER
TAPE
physical filename (dd NAME)

DATA DIVISION.
FILE SECTION.
FD <logical filename>
[BLOCK CONTAINS [int1 to] int2 RECORDS / CHARACTERS
RECORD CONTAINS [int1 to] int2 CHARACTERS
DATA RECORD IS BANK-REC
RECORDING MODE IS F/V ]
LABEL RECORDS ARE STANDARD/OMITTED
VALUE OF FILE-ID IS "physical filename".
01 BANK-REC.
02 ACCNO PIC 9(5).
02 ACCNA PIC X(20).
02 ACCTY PIC A.
02 ACCAM PIC 9(5).

OPEN
--------

OPEN mode <logical filename>.

MODE
---------

INPUT, OUTPUT, EXTEND, I-O

OUTPUT - Write opeartion


INPUT - Read opeartion
EXTEND - write opeartion(append)
I-O - read and rewrite operation

WRITE
--------- WRITE groupname.

WRITE BANK-REC.

WRITE BANK-REC FROM REC2.


CLOSE
---------
CLOSE <logical file name> .
READ
-------
READ <logicalfilename> AT END <statement>.

REWRITE
------------
REWRITE groupname

REWRITE BANK-REC

You might also like