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

Cobol - How we can edit records in vsam data set and non vsam data sets?




627
views
asked mar September 17, 2014 11:45 AM  

How we can edit records in vsam data set and non vsam data sets?


           

1 Answers



 
answered By Mswami   0  

WRITE statement:

WRITE CAPTECH1-REC FROM WS-RECORD1
END-WRITE.

File opened in OUTPUT or EXTEND mode then we can use WRITE statement to write records into the file. If from is used then the data in WS-RECORD1 is moved to record and writing take place. If FROM is omitted then Data moved to record name will be written into file. If we are reading file we refer file name in READ statement, whereas while writing we refer record name with WRITE command.

REWRITE statement:

REWRITE command is used to update a record in a file. If file is opened in I-O mode then only we can use REWRITE command on that file. This REWRITE is not available in Sequential file. Before using REWRITE command, corresponding record should be read.

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