Checking for Orphan Data

The Orphan Check Utility is used to test the records in the database to see if they are pointing to missing parent data.  An example of an orphan record would be a customer record which does not have a valid Terms Code. 

StreamV and Visual Dataflex test the database records being used during processing, and the systems will not allow you to save records which do not point to valid parent records.  The system will also block you from processing a transaction (such as a sales order or invoice) if the item or company record being used for the transaction is not valid.

The Orphan check utility allows you to test the records in your database files and to identify any records which do not point to valid parent data.   The utility may be run to test newly imported records during system startup, or to check the existing database records in a running system to make sure the records all point to valid parent records.

If the Orphan Check utilty is being used during a new system startup, the Orphan check utiltiy should be run, and the problems identified by the utility should be fixed, prior to running the Datacheck utility described later in this document.

The Orphan Check Utility is included in the Database Builder application.  The Database Builder program is located in the /cove/vdf150rt/Bin Directory (this may be a local or a network directory based on how you have installed the application).

Once you have activated the Database Builder program, you should select the workspace to be checked for orphans using the Select Workspace option located on the File Menu.

Once you have selected the correct workspace, you may then select the Check For Orphans option from the Reports Menu.  When you select the Check for Orphans option, the system displays a program that can be used to select the files to be checked.  Once you have selected the files to be checked or have selected all files, you may press the Orphan Check Button to run the report.  At this point, the system will check the records in the selected files, and it will create and display a report for the selected files.  The report can be used to identify the files with orphan records.  The report will indicate the file name, the status of the file and it will list the number of orphans for each parent file – and the parent files which are being pointed to by the orphans.

If the Orphan Check program finds orphan records for a file, it will also create and output an ORP file in text format (normally to the data directory), that lists the specific record numbers for the orphan records in each datafile.  The orphan text file is named after the file containing the orphans (i.e. INVTRAN.ORP)

Orphan Check – Technical Notes

      Invtran file:  When you run the Orphan Check program, the system may show errors on the Invtran (Inventory Activity file).  The Inventory Activity file is used to record inventory transactions, and the records in the file may or may not point to a customer invoice, ap invoice, po, shop order, or another document (based on the type of transaction being processed).  You may disregard any errors shown for this file if the errors point to the Invoice Header, PO Header or Shop Order Header files.

More:

Running the Datacheck Utility