Operating System - OpenVMS
1751917 Members
5140 Online
108783 Solutions
New Discussion

Re: How to erase records in datatrieve

 
panneer
Occasional Contributor

How to erase records in datatrieve

I have two files A and B .there is no common field for both.date(field in A) and day(field in B).
Ready A
Ready B
find all a cross b with date < day
find all current with status="OK"
Erase all

Since erase all wont work ....i have tried this in a for loop
for first in A
erase all B with date < first.day

The above code will erase all the records .But i need to delete records based on the status="OK".

so how to combine Ready A
Ready B
find all a cross b with date < day
find all current with status="OK"
Erase all
into a for loop or is ter any other means of converting this so tat i can delete only the required records.
1 REPLY 1
Leif R. Jansson
Occasional Advisor

Re: How to erase records in datatrieve

Hi

Try:

for first in A
erase all B with date < first.day and status="OK"

/Regards
Leif J
All questions are good questions