ADD function

Use to store data into the system by specifying the folder, application group, application, and database fields and values.

Note: The Add Document (ADDDOCOND) command includes most of the capabilities of the ARSDOC ADD function but provides a native IBM i command interface and help text.
Important: Set the proper locale before issuing the ARSDOC ADD API. See the chapter entitled Defining a locale in the IBM® Content Manager OnDemand for i Common Server Planning and Installation Guide for important details.
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 string. The default value for numeric fields is 0 (zero). Numeric fields include integer and decimal (floating point) fields. When adding a document, you can specify the data in one of the following ways:
  • A document file
  • An SQL query that contains clauses, database field names, index values, and operators (-i)
  • A public named query (-n)
  • A hold name (-l)
  • A text search string (-t or -T)

When you specify an SQL query, public named query, hold name, or text search string, you are creating a database row that points to an existing document that has been identified by the query.

When you use the ADD function to add a row for an existing document, the row must be added to the application group and the application that contain the 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 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 index data for an existing document, Load can also be specified for Expiration Type if the existing document is identified by an SQL string, public named query, text string, or hold name.

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 archive 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, -u, -U, and -v 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-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][-odocfilename][-qnamedQuery][-tsearch_string][-Tsearch_string][-ndbfield=value][-O][-Sstartdate,enddate,format]