GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Mainframe  >  COBOL
Go To First  |  Previous Question  |  Next Question 
 COBOL  |  Question 78 of 162    Print  
How to delete sequential file?

  
Total Answers and Comments: 6 Last Update: September 20, 2008     Asked by: Gilbat 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Chethan V K
 

Hi,

To delete a sequential file thru a COBOL program.. open the file in output mode and close the file immediately. All the records in the file will get deleted.

Thanks

Chethan



Above answer was rated as good by the following members:
kkkanagaraj
October 17, 2006 04:25:42   #1  
Max        

RE: How to delete sequential file?

There are many ways to delete a sequential file.The followings are common ways.

1)use tso command: ' tso delete 'file name''.

2)use jcl and write a DD card for that file with disp (old delete delete).

3)or just use a ISPF pannel to do it.


 
Is this answer useful? Yes | No
October 26, 2006 07:41:11   #2  
Chethan V K        

RE: How to delete sequential file?

Hi

To delete a sequential file thru a COBOL program.. open the file in output mode and close the file immediately. All the records in the file will get deleted.

Thanks

Chethan


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
November 05, 2006 08:05:07   #3  
J.MERCY        

RE: How to delete sequential file?

RECORDS IN SEQUENTIAL FILE CANNOT BE DELETED.


 
Is this answer useful? Yes | No
December 10, 2006 08:56:19   #4  
Anil TG        

RE: How to delete sequential file?
y?...it wus right..it is posible to delete contents of a sequential file by opening it in output mode and closing immediately...all data will be truncated...
 
Is this answer useful? Yes | No
January 12, 2007 05:13:15   #5  
       

RE: How to delete sequential file?

In cobol there is direct command for deleting records from sequential file. We can follow the below steps and delete the records from sequential file. for example.

01 input-record.

02 in-empcd pic 9(5).

02 in-name pic x(20).

02 in-trcd pic 9(2).


 
Is this answer useful? Yes | No
September 20, 2008 01:40:56   #6  
vissusmarty.1986 Member Since: September 2008   Contribution: 2    

RE: How to delete sequential file?

There are two ways to delete records in a sequential file
1. To move spaces to the records.
2. To rewrite the file with out moving the records which we want to delete from the file.


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape