Rebuilding PracticeMaster Data

Last reviewed: 06/22/2009
Article ID: R10522

The information in this article applies to:

SUMMARY

When data corruption exists in a data file, typically the best option is to restore from a backup. Unfortunately, restoring from a backup may not always be an acceptable option. Perhaps a current backup is not available or restoring from the last known good backup may result in the loss of a great deal of work. This article contains workarounds that may eliminate the need to restore from a backup.

Before attempting to resolve any problems, run the Data File Integrity Check program. Use the Help provided with PracticeMaster or Knowledge Base articles to assist you with procedures for resolving various errors.

Note: Be aware that these procedures are not guaranteed and may not produce acceptable results. These methods should not be considered as a substitute for good backup policies.

MORE INFORMATION

PracticeMaster maintains two types of files: data files and index files. Data files (*.DAT) contain the information that has been entered in the file (i.e., individual records) and the file layout. Index files (*.IDX) are "pointer" files used by PracticeMaster to locate the position of specific records within the data file. The following procedures are dependent on the type of data file that needs to be rebuilt.

Note: If these procedures do not work, you will have to restore from a backup.

Reindex Files

With some data corruption problems, particularly in an *.IDX file, it is possible that the Reindex Files program can be used to correct the problem. The Reindex Files program in PracticeMaster is a utility program that can be used to rebuild PracticeMaster's index files. The Reindex Files program deletes the existing index files for the selected data files and recreates them. The ability to recreate index files allows for the possibility of salvaging data if the index files become corrupted due to hardware failure. This program is typically used only after certain errors have been encountered by the Data File Integrity Check program. KB Article R10102, "How Reindex Data Files Affects Your Data", contains additional information regarding the Reindex Data Files program.

Exporting Data & Reimporting Data

With other types of data corruption problems, usually in a *.DAT file, the Reindex Files program will not fix the problem. In this case, it is a possibility that data can be salvaged by using the Export Data and Import Data programs. This method consists of exporting the data to an ASCII text file and then importing the data back into PracticeMaster. There are two variations on this method:

Option 1:  If the problem is with a .DAT file and restoring from a backup is not an option, you may be able to salvage the data by exporting the data, erasing the data and then reimporting it using the File Utilities options in File Maintenance.

Option 2:  If Option 1 does not work, as a last resort, it may be possible to salvage some data by exporting the data, deleting the associated .DAT and .IDX files and then re-importing the export file. Restoring from a backup may be a better option.

It is important to note that upon importing the data in either scenario, the corrupted data records may be rejected. If data is successfully exported, it is possible to open the file with a text editor and possibly edit the file.

Detailed steps for each of these options are included in this article.

What is a File Layout?

The following items are referred to as file layouts and are stored in the .DAT file. When a .DAT file is deleted (Option 2), this information will be lost and will have to be manually rebuilt.

When a system (.DAT) file that comes standard with PracticeMaster is not present, PracticeMaster will recreate the .DAT file using the standard (OEM) file layout. When a custom system file or any area of practice (.DAT) file is deleted, the field definition will be blank if the file is recreated. System files that come standard with PracticeMaster are:

System Files

System Lookup Files

Billing System Files

System Common Case Related Files

Case File
Calendar File

Related Party File
Calendar Code File

Timekeeper File
Category File
Transaction Code File
Task Code File
Location File
Text Macro File

Journal File
Document Management File
Fee File
Cost File

Notes:

If you delete or erase the Fee File (CMFEE.DAT) and any fee work-in-process transactions were created by the Process Timer Records program, the Timer Fee Report will no longer include the associated journal record. Furthermore, the Load Fee Record feature in the Journal file will no longer load the associated fee record. The journal records will point to incorrect fee records because corresponding sequence numbers in the Journal File are not changed and still point to the old sequence numbers in the deleted CMFEE.DAT file.

If you delete or erase the Calendar File (CMCAL.DAT) after exporting the data, you will have to run the Rebuild Calendar Plan Templates and Rebuild Calendar Plan List options after re-importing. When the Calendar Plan Templates are exported and the CMCAL.DAT file is deleted, some information will be lost such as the calendar plan template name, description, the calendar plan repetitive switch, and who processed it. In addition, all of the Calendar Plan Templates will be listed under the System Files folder even if they previously were under an AOP specific folder.

If you delete the Transaction Code File (CMTCODE.DAT), make sure that no one attempts to reinstall the PracticeMaster program files before you import the transaction code file. If the program files are reinstalled when this file does not exist, you will be given an option to install PracticeMaster Starter Data. If this is done, the existing PracticeMaster data will be overwritten and you will have to restore from a backup.

PROCEDURES

Option 1:  Exporting, Erasing and Reimporting Data

To export data, erase it and then reimport it, follow these procedures:

  1. Make a complete backup of the existing data. Do not overwrite an existing backup. Depending on which files will be erased, changes made may affect Tabs3 and TAS. Therefore, we recommend backing up those systems also.
  2. Open File Maintenance (Maintenance | File Maintenance).
  3. Double-click the file whose data you are working with.
  4. From the Utility tab, click Export Data. Make sure the Include Field Names in First Record check box is selected. Follow the on-screen instructions to complete this process.
  5. From the Utility tab, click Erase File Data.
  6. From the Utility tab, click Import Data. Follow the on-screen instructions to complete this process.
  7. If an Import Error Log Report is created, you will be asked if you want to view the report. Print the report and review any errors.
  8. If you are working with the Related Party File, you must run the Reindex Files program with the Compact Selected Files check box selected. If you do not do this, the Data File Integrity Check will report multiple error code 151s (i.e., "Cross reference record not found for Related Party field"). In order to select the Compact Selected Files check box, you must close File Maintenance. From the Maintenance Task Folder, click Reindex Files. Click the Select Files button and select the Related Party File (in the Lookup Files folder). Select the Compact Selected Files check box. Click OK to reindex the file.
  9. Run a Data File Integrity Check.

Option 2:  Exporting Data, Deleting *.DAT & *.IDX, and then Reimporting Data

If the file layout, which is stored in the header record of the *.DAT file, is corrupted, you may need to export data, delete the *.DAT and *.IDX files for the problem file and then reimport the data.

Procedures

Use the following procedures for this option:

  1. Make a complete backup of the existing data.  Do not overwrite an existing backup. Depending on which files will be erased, changes made may affect Tabs3 and TAS. Therefore, we recommend backing up those systems also.
  2. Open File Maintenance (Maintenance | File Maintenance).
  3. Double-click the file whose data you are working with.
  4. If possible, print out a file definition for the existing file. To do this, from the Utility tab, click Print File Definition. This information will be useful when recreating the file definition.
  5. From the Utility tab, click Export Data. Make sure the Include Field Names in First Record check box is selected. Follow the on-screen instructions to complete this process.
  6. Exit PracticeMaster.
  7. Using Windows Explorer, delete the associated .DAT and .IDX file. Depending on which file you are working with, these files will be located in the PracticeMaster program directory, the CMSYSTEM folder under the PracticeMaster program directory, or in an Area of Practice folder under the PracticeMaster program directory.
  8. Restart PracticeMaster.
  9. If the file you are working with is a standard file in PracticeMaster (i.e, the file was included when PracticeMaster was first installed), the standard OEM file layout will be created automatically when PracticeMaster is started and only the custom changes will need to be reentered. However, if the file you are working with is a custom file or an Area of Practice file, the entire file definition will have to be recreated. Open File Maintenance (Maintenance | File Maintenance) and double-click the file whose data you are working with. Re-enter the field definitions if necessary. Enter any custom indexes and column layouts.
  10. Save these changes by exiting File Maintenance.
  11. Open File Maintenance (Maintenance | File Maintenance) and double-click the file whose data you are working with.
  12. From the Utility tab, click Import Data. Follow the on-screen instructions to complete this process. Be sure to verify and, if necessary, correct the field mapping.
  13. If an Import Error Log Report is created, you will be asked if you want to view the report. Print the report and review any errors.
  14. If you are importing data for the calendar file, run the Rebuild Calendar Plan Templates and Rebuild Calendar Plan List programs. Re-enter the calendar plan template names and descriptions.
  15. If you are working with the Related Party File, you must run the Reindex Files program with the Compact Selected Files option. If you do not do this, the Data File Integrity Check will report multiple error code 151s (i.e., "Cross reference record not found for Related Party field"). In order to select the Compact Selected Files option, you must close File Maintenance. From the Maintenance Task Folder, click Reindex Files. Click Select Files and select the Related Party File. Select the Compact Selected Files check box. Click OK to reindex the file.
  16. Run a Data File Integrity Check. Proceed only if there are no errors.
  17. Rebuild the customized form layout as desired using the Form Designer.

References


© 1999-2012 Software Technology, Inc.   All rights reserved. Terms of Use
The maker of Tabs3 and PracticeMaster
Tabs3, PracticeMaster, and the “pinwheel” symbol (The "Pinwheel" symbol is a Registered Trademark of Software Technology, Inc.) are registered trademarks of Software Technology, Inc.
e-Mail Suggestions for the Knowledge Base to: kb@Tabs3.com
Technical Support via e-mail is not available.
Knowledge Base:   http://support.Tabs3.com
Web Site:   http://www.Tabs3.com