File not available Revisited (AREV Specific)
At 16 MAY 2000 01:29:23AM Dana Corson wrote:
I inherited a problem from some one else on something was midstride in development regarding something like the following thread:
Subject: File not AVAILABLE
Category: AREV Specific
Author: Sainimili Saunalia
Date: 10/26/99
However, my problem is the REVMEDIA.* has a reference to the REV_FILE, but when you look @ the directory for it in DOS, the REVxxxxx.* are missing.
The indexes and dictionary to the REV_FILE are there and can be used, but no data portion.
How do I either:
1. Remove the DIcts and Indexes
2. Add in a file name to support the indexes & Dictionary
3. Synchronize the REVMEDIA to what is actually in the directory?
Thanks a lot, I'm sure some one has covered this before.
Dana Corson
At 16 MAY 2000 01:46AM Larry Wilson - TARDIS Systems, Inc. wrote:
Someone might have slicker suggestion, but I think the easiest thing to do is to create a new file (any name will do), then copy the old DICT over to it. Copying the DICT should create the ! file (you didn't say which version, but I assume 3.x since you said the indexes were there for the file). I would assume you don't want to copy any data in the index (such as indexed data from the missing DATA portion). If you have any Relational indexes, you'll need to remove them and recreate - copying the items doesn't really do it.
Ok, you've got new file with a proper DICT, an empty data and index file. Now you need to delete the old file.
Write the REVxxxxx number down for the DICT, DATA and !file.
Do a SETFILE from TCL:
SETFILE {media path) SYSPROG{,password} REVMEDIA REVTEMP
Now, edit the REVTEMP for the three files:
EDIT REVTEMP DICT.{filename}*{account} - now delete that entry
EDIT REVTEMP {filename}*{account} - now delete that entry
EDIT REVTEMP {!filename}*{account} - now delete that entry
Go to DOS, to the directory where the files are and CAREFULLY delete the REVxxxxx names you copied down (both the LK and OV portions)
Logoff and the back on to AREV.
Now you go to the Developer menu, DB Admin, Tables, RENAME and rename the new file to the old file name. Done. LISTMEDIA should read correctly along with new REVxxxxx DOS filenames associated the the REV file you're working with.
The interesting question is, of course, what happened to the DATA portion. The only times I've seen something like that was when a departing programmer deleted a file on purpose; I'm not saying that's what happened in your case, but just relaying what my experience has been. Backups are good - I assume there's not one available.
tardis_systems@yahoo.com
At 16 MAY 2000 07:27AM Warren wrote:
In all cases REV_FILE is assumed the file name in question
]How do I either:
]1. Remove the DIcts and Indexes
At TCL:
DELETEFILE DICT REV_FILE
DELETEFILE !REV_FILE
(or DELETETABLE depending on version)
This however leaves the orphaned entry for the data portion in the REVMEDIA file. To delete this at TCL:
SETFILE/SETALIAS volume SYSPROG{,password to sysprog} REVMEDIA
Then delete the item account/application*REV_FILE
]2. Add in a file name to support the indexes & Dictionary
The question is why is the data portion missing? Perhaps some created the DICT and Index without creating the data? Or worse still the data portion was in use during a backup and not saved and 'missing' during subsequent restore? Regardless, if the data is not the issue then from
DOS merely copy the DOS file associated to the DICT to the data portion. Example:
DICT REV_FILE=REV25001
DATA REV_FILE=REV25002
in DOS:
COPY REV25001.* REV25002.*
Then back in AREV do a clearfile/cleartable REV_FILE
]3. Synchronize the REVMEDIA to what is actually in the directory?
Tricky, basically you have to compare what is in the directory to what is in the revmedia map for that directory then either delete the orphan entries either in the revmedia file or the orphaned DOS files (REVMEDIA entry - DOS file doesn't exist or DOS REVxxxxx file with no REVMEDIA entry, respectively) or create a REVMEDIA entry if one is missing. You can create REVMEDIA entries by following the SETFILE procedure as outlined above then using the editor to add the items. Mike Pope wrote a utility to help rebuild revmedia files. I believe it is in the download section in the all.zip file, but it is somewhat tricky to use. I have a CLEAN_ACCOUNT utility patterned after the PRIME INFORMATION verb which identifies orphaned revmedia and DOS file entries as well as CATALOGed VOC entries with no corresponding source code. You have to manually clean up the revmedia and DOS files. I'll submit it to RTI for inclusion in the developers section later this week or leave an e-mail address and I'll send you a copy.
At 16 MAY 2000 05:46PM Dana Corson wrote:
You guys are good. Thanks for the help
I don't know why it happened, but what I inherited was a in progress application.
Thanks again.
Dana