arsdoc update

From CMOD.wiki
Jump to: navigation, search

In IBM CMOD, the arsdoc update command is used to change index values of data that is already loaded. This may be used to update a status field used for workflow or tracking, but should not be used to update index data used to search for documents, as you could render documents irretrievable.

If you are being asked to correct index data due to a data quality issue, the solution should be to improve data quality, NOT to force IBM CMOD to change index data. The alteration of index data as a part of normal processing creates a risk that your system will not be considered a reliable archive, and in a court of law, the accuracy of the system could be called into question.

Attention.png
WARNING: It is not just possible, but extremely easy to irrecoverably damage the data in your Content Manager OnDemand server with the arsdoc update command. The examples below are meant as a guide only, and you are solely responsible for any damage to your OnDemand server. Practice makes perfect!

Preparing to run arsdoc update

Before running arsdoc update, you need to complete two steps. First, create a new folder that consists only of the fields you wish to search and update using the arsdoc update command. Second, ensure that you have permissions to access the folder, and permissions to update the fields in the SINGLE Application Group that require changes.

Enabling Index Data Changes for Application Groups & Folders

Create the search criteria for arsdoc update

There are two ways to create the criteria that will be used to execute the change. You can perform a search of your new folder, and save the search parameters as a 'named query' in the Content Manager OnDemand Windows 'Thick Client', or manually create an SQL statement that finds the specific documents you're looking to change.

Insert diagram here - creating a named query

Date formats when using arsdoc update

IBM Content Manager OnDemand date formats are always tricky - it's best to use the date format specified in the folder definition when creating the parameters for your arsdoc update commands. If you write your own SQL, prefix any date fields with "ODDAT." so that the database can attempt to convert the date format for you.

Double checking the changes with arsdoc query

Before proceeding to the next step, double check the changes you're about to make to the OnDemand Application Group, by testing your search criteria with the arsdoc query command. Only when you have the precise results you want, should you perform the arsdoc update command.

Changing the data with arsdoc update

Attention.png
WARNING: There is no 'undo' command for arsdoc update. The changes you're requesting are usually made in a fraction of a second, and there will be no way to revert the change back to the original state. It is a wise and prudent move to create a full, offline database backup immediately before running arsdoc update. If an IBM CMOD database backup isn't reasonable, then have your DBA create a backup of the OnDemand management tables (starting with 'ARS'), and Application Group tables, so they can be restored without having to resort to a full database outage.

Formulating the actual arsdoc update command is tricky, and takes practise to get right. Your command should be tested on non-production OnDemand servers, and verified to be providing the correct results BEFORE executing them in a production environment.

Testing the results of the change

After the change is complete, then perform the query again, to ensure the changes have been made according to your wishes. Also, query some other documents to ensure that you change only affected the documents you intended to change.