Delete a record from a file



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

Delete a record from a file

Postby Bhavanijenjeti » Wed Sep 01, 2010 1:28 pm

Hi All,


I am trying to delete a record from a temporary flat file.
Can some one help me with the synatx in easytrieve to empty a temporary file or delete a specific record.

Thank You,
Bhavani
Bhavanijenjeti
 
Posts: 1
Joined: Wed Sep 01, 2010 1:23 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Delete a record from a file

Postby NicC » Wed Sep 01, 2010 1:32 pm

Like any other language using flat, ie sequential, files you read file A and write the records you want to file B.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3026
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Delete a record from a file

Postby dick scherrer » Wed Sep 01, 2010 10:52 pm

Hello,

Once a record has been written to a sequential file, it cannot be "deleted". As suggested, you can copy the file omitting records that are not needed in the "new" file.

To create an empty file, open the file as output and do not write any records. When the file is closed, it will have no records (i.e. it will be empty).
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post