Home > Software > Mainframe > Cobol
Interview Questions   Tutorials   Discussions   Programs   

Cobol - What are different file OPEN modes available in COBOL?




388
views
asked mar August 3, 2014 12:44 AM  

What are different file OPEN modes available in COBOL?


           

1 Answers



 
answered By Mswami   0  
Open: Dataset is connected/readied to your program using OPEN statement. The mode of OPEN decides the operation allowed and the initial pointer in the dataset.

OPEN STATEMENT:
Syntax:     OPEN OPENMODE FILENAME

OPENMODE can be INPUT OUTPUT I-O EXTEND
INPUT        - File can be used ONLY-FOR-READ purpose.
OUTPUT    - File can be used ONLY-FOR-WRITE purpose.
I-O            - File can be used FOR READ, WRITE and REWRITE purpose.
EXTEND    - File can be used FOR appending records using WRITE.
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert