Routine Codes are a secondary identifier, added to the existing routine identifier. Routine Codes, when added to the characteristics Feature Label, Hand and Key Filters, create an identifier that is unique throughout the CM4D Site database. This unique identifier prevents data from being accidentally overwritten by a new or existing routine which might contain the same Feature Label, Hand and Key Filters.
Routine Codes increase the efficiency of DataSmith as it processes data, so it is recommended that you use Routine Codes in databases that are connected to a Site database.
There are some things you should know before implementing Routine Codes:
· If you do not have a site layer, you will not be able to use Routine Codes.
· A site layer can contain many databases, but a database should never be used in more than one site layer. (Creating multiple site layers is not recommended.)
· Do not try to implement Routine Codes in an already existing database. The decision to use and implement Routine Codes should be made at the time the database is created.
A Routine Code should be a unique identifier for the routine throughout the CM4D Site Layer database. A Routine Code can be an existing part of a data file, added in DataSmith, or created by DataUtility.
Using Routine Codes will affect which database is selected during output. The DataSmith file will first try to match information in the Routine Code and DataSource Label characteristics with information in the site layer. If the DataSmith file cannot match the Routine Code or DataSource Label, it will output the data to the DataSource selected in step two of the Output Setup dialog. This means that even though you had selected a database, DataSmith may output data to a different database, depending on the information it finds at the time of output.
DataSmith will select a database to receive the data depending on the order of precedence listed below.
1. Before data output, DataSmith will look for a matching Routine Code in the site layer. If it finds that a Routine Code exists in the Site Layer that matches the Routine Code characteristic in the data file, it will output the data to the database that contains that routine code. If you had selected another database in step two of the Output Setup dialog, DataSmith will ignore your selection and your data would go to the database containing the matching routine code.
2. If DataSmith does not find a matching routine code in the site layer, it will then try to match the characteristic DataSource Label to the DataSource Label in the site layer. If it finds a match, it will output the data to the matching database. If you had selected another database, DataSmith will ignore your selection.
3. If DataSmith is not able to match a Routine Code or DataSource Label in the site layer, it will use the database selected step two of the Output Setup dialog.
To avoid accidentally putting data in the wrong database, it is recommended that you compare the Routine Code characteristic and the DataSource Label characteristic to the information in the CM4D Site Layer Database. This should be done before completing step five of the Output Setup dialog, Output to Database.