ADD function

The ADD function can be used to add a new document and its associated index values to Content Manager OnDemand, or to add a new database row of index values that points to an existing document.

When adding a new document, you specify the folder, application group, application, and database fields and values. If you specify the -O parameter, then you do not have to specify all of the database fields; however, you must always specify fields related to date or time fields. When you specify the -O parameter, the ARSDOC program stores a default value in any database field that you omit. The default value for string fields is an empty (null) string. The default value for numeric fields is 0 (zero). Numeric fields include integer and decimal fields. When adding a new document, you also specify the input document by using the -o parameter.

When adding a new database row that points to an existing document, you can locate the existing document in one of the following ways:
  • An SQL query that contains clauses, database field names, index values, and operators (-i)
  • A hold name (-l)
  • A public named query (-q)
  • A text search string (-t or -T)

When you specify an SQL query, hold name, public named query, or text search string, you are creating a database row that points to an existing document that has been identified by the query. The row must be added to the application group and the application that contain the existing document. The application must be specified with the -a parameter. The application group must be specified with the -g parameter and must be one of the application groups that is referenced by the folder named with the -f parameter.

Important: The Database Organization of the application group must be set to Multiple loads per database table to add a document. If a new document is added, the Expiration Type must be set to Segment or Document. If you are adding a new database row that points to an existing document, Load can also be specified for Expiration Type if the existing document is identified by an SQL string, hold name, public named query, or text string.

Storage management for the application group needs to be configured to use cache. Cache is required to allow the Content Manager OnDemand server to build a larger storage object and append to the data. Then this storage object can be migrated to an external storage manager, such as TSM or cloud storage.

Read syntax diagramSkip visual syntax diagramarsdoc add-aapplication -ffolder-gapplGroup-GapplGroup-hinstance -isqlQuery-lholdname-odocfilename-qnamedQuery-tsearch_string-Tsearch_string-ndbfield=value-O-ppassword-Sstartdate,enddate,format-uuserid-Uuser_alias-v-1trace_file-2level
When you use the parameter file option, you must specify the -F, -h, -p, -u, -U, -v, -1, and -2 parameters on the command line. All other parameters must be specified in the parameter file. The following diagram shows the syntax of the ADD function when you use the parameter file option:
Read syntax diagramSkip visual syntax diagramarsdoc add-Fparmfile -hinstance -ppassword-uuserid-Uuser_alias-v-1trace_file-2level
The syntax of the parameter file for the ADD function is:
Read syntax diagramSkip visual syntax diagram[-aapplication ][-ffolder ][-gapplGroup-GapplGroup][-isqlQuery][-lholdname][-odocfilename][-qnamedQuery][-tsearch_string][-Tsearch_string][-ndbfield=value][-O][-Sstartdate,enddate,format]
Important: To use the ADD function, every database field in the application group must be mapped to a folder field. The database field values are validated based on the information that is provided in the folder field.