### Index Documents from a Single Input File (Indexer Example 2) Source: https://www.ibm.com/docs/en/cmofz/10.5_topic=indexer-parameter-file-examples This example shows how to index multiple documents when all document data is contained within a single input file. It specifies the code page, document fields, and for each document, its starting byte offset and length within the shared file. ```text COMMENT: COMMENT: Generic indexer Example 2 COMMENT: One input file contains all documents COMMENT: COMMENT: Specify code page of the index data CODEPAGE:819 COMMENT: Document #1 GROUP_FIELD_NAME:rdate GROUP_FIELD_VALUE:07/13/99 GROUP_FIELD_NAME:studentID GROUP_FIELD_VALUE:0012345678 COMMENT: first document starts at beginning of file (byte 0) GROUP_OFFSET:0 COMMENT: document length 8124 bytes GROUP_LENGTH:8124 GROUP_FILENAME:/arstmp/accounting.student information.loan.out COMMENT: Document #2 GROUP_FIELD_NAME:rdate GROUP_FIELD_VALUE:08/13/99 GROUP_FIELD_NAME:studentID GROUP_FIELD_VALUE:0012345678 COMMENT: second document starts at byte 8124 GROUP_OFFSET:8124 COMMENT: document length 8124 bytes GROUP_FILENAME: COMMENT: Document #3 GROUP_FIELD_NAME:rdate GROUP_FIELD_VALUE:09/13/99 GROUP_FIELD_NAME:studentID GROUP_FIELD_VALUE:0012345678 COMMENT: third document starts at byte 16248 GROUP_OFFSET:16248 COMMENT: document length 8124 bytes GROUP_LENGTH:8124 COMMENT: use prior GROUP_FILENAME: GROUP_FILENAME: COMMENT: COMMENT: End Generic indexer Example 2 ``` -------------------------------- ### Structured APIs Sample Drivers Source: https://www.ibm.com/docs/en/cmofz/10.5_topic=requests-annotations-api Provides sample drivers or code examples to help developers get started with using the structured APIs. ```APIDOC ## Structured APIs Sample Drivers This section contains sample code drivers and examples that illustrate how to integrate with and utilize the Content Manager OnDemand structured APIs. These samples are intended to accelerate development and provide practical implementation guidance. ``` -------------------------------- ### Starting a User Object Source: https://www.ibm.com/docs/en/cmofz/10.5_topic=system-creating-xml-file Demonstrates how to initiate a 'user' object within an XML file. Object name capitalization is critical and must match the data tables. ```xml -u -G -X -o -v` ### Parameters #### Path Parameters None #### Query Parameters - **-h** (string) - Required - Archive name. - **-u** (string) - Required - User name. - **-G** (string) - Required - Application group name. - **-X** (string) - Required - Load ID for the index file. - **-o** (string) - Required - Output file name. - **-v** - Optional - Verbose mode. ### Request Example ``` arsdoc get -h ARCHIVE -u sysadmin -G BILLS -X 167332-2-0-8FAA-20181219000000-20181219000000-167333 -o outfile -v ``` ### Response #### Success Response (200) Documents are retrieved and saved to the specified outfile. #### Response Example (Output content depends on the retrieved documents) ``` -------------------------------- ### Index Documents with Separate Input Files (Indexer Example 1) Source: https://www.ibm.com/docs/en/cmofz/10.5_topic=indexer-parameter-file-examples This example demonstrates how to specify indexing information for multiple documents when each document's data resides in a separate input file. It includes configurations for code page, document fields (name and value), data offset, length, and filename. ```text COMMENT: COMMENT: Generic indexer Example 1 COMMENT: Different input file for each document COMMENT: COMMENT: Specify code page of the index data CODEPAGE:819 COMMENT: Document #1 COMMENT: Index field #1 GROUP_FIELD_NAME:rdate GROUP_FIELD_VALUE:07/13/99 COMMENT: Index field #2 GROUP_FIELD_NAME:studentID GROUP_FIELD_VALUE:0012345678 COMMENT: document data starts at beginning of file GROUP_OFFSET:0 COMMENT: document data goes to end of file GROUP_LENGTH:0 GROUP_FILENAME:/arstmp/statement7.out COMMENT: Document #2 COMMENT: Index field #1 GROUP_FIELD_NAME:rdate GROUP_FIELD_VALUE:08/13/99 COMMENT: Index field #2 GROUP_FIELD_NAME:studentID GROUP_FIELD_VALUE:0012345678 GROUP_OFFSET:0 GROUP_LENGTH:0 GROUP_FILENAME:/arstmp/statement8.out COMMENT: Document #3 COMMENT: Index field #1 GROUP_FIELD_NAME:rdate GROUP_FIELD_VALUE:09/13/99 COMMENT: Index field #2 GROUP_FIELD_NAME:studentID GROUP_FIELD_VALUE:0012345678 GROUP_OFFSET:0 GROUP_LENGTH:0 GROUP_FILENAME:/arstmp/statement9.out COMMENT: COMMENT: End Generic indexer Example 1 ``` -------------------------------- ### PDOC Indexing with TYPE=GROUPRANGE2 (Example 1) Source: https://www.ibm.com/docs/en/cmofz/10.5_topic=indexstyle-pdoc This example demonstrates PDOC report indexing using TYPE=GROUPRANGE2 on INDEX2, with distinct fields for locating start and end range values. It utilizes TRIGGER1 for the start value and TRIGGER3 for the end value, defining 'BANK_BRANCH' and 'LOAN_NUMBER' indexes. ```INI FILEFORMAT=RECORD,90 GROUPMAXPAGES=100 TRIGGER1=*,1,X'F1',(TYPE=GROUP) /* 1 */ TRIGGER2=*,2,X'C2C1D5D2',(TYPE=GROUP) /* BANK */ TRIGGER3=*,46,X'4B',(TYPE=FLOAT) /* . */ FIELD1=1,11,3,(TRIGGER=1,BASE=0) FIELD2=8,3,10,(TRIGGER=1,BASE=0) FIELD3=0,3,10,(TRIGGER=3,BASE=0) FIELD4=0,83,8,(TRIGGER=1,BASE=0) INDEX1=X'C2C1D5D26DC2D9C1D5C3C8',FIELD1,(TYPE=GROUP,BREAK=YES) /* BANK_BRANCH */ INDEX2=X'D3D6C1D56DD5E4D4C2C5D9',FIELD2,FIELD3,(TYPE=GROUPRANGE2) /* LOAN_NUMBER */ INDEX3=X'D7D6E2E3C9D5C76DC4C1E3C5',FIELD4,(TYPE=GROUP,BREAK=NO) /* POSTING_DATE */ ``` -------------------------------- ### Complete XML Example: Users and Groups Source: https://www.ibm.com/docs/en/cmofz/10.5_topic=system-creating-xml-file A full Content Manager OnDemand XML file example showcasing the structure for defining multiple user objects and a group object, including their respective attributes and child elements. ```xml ``` -------------------------------- ### Signature Data Example Source: https://www.ibm.com/docs/en/cmofz/10.5_topic=requests-specifying-headers An example of the data used to sign a GET request for retrieving a Content Manager OnDemand document using the CMODSharedKeyV2 authorization header. ```text GET 2020-02-03T23:31:04Z /cmod-rest/v1/hits/Ledger Reports/Y2BN9Y/iiqZRQKNZZ7xgk5t4+... externpool1-P0mFoCU5H83lN9uQcRUA ``` -------------------------------- ### Create MidServer Directory and Copy Files (Bash) Source: https://www.ibm.com/docs/en/cmofz/10.5_topic=instructions-populating-hfs This snippet covers creating the 'midserver' directory and copying the 'arsMSVR.cfg' and 'arsMSVR.sh' files from a samples directory to the newly created directory. It requires superuser privileges or appropriate permissions. ```bash mkdir midserver cp /MountPoint/samples/arsMSVR.* /MountPoint/config/midserver ``` -------------------------------- ### Set Development Environment LIBPATH for AIX Source: https://www.ibm.com/docs/en/cmofz/10.5_topic=connections-installing-odwek-in-non-default-location This example shows how to configure the LIBPATH environment variable on an AIX server when using a non-default ODWEK installation directory. It ensures that the necessary ODWEK libraries are discoverable by the system. ```shell export LIBPATH=/opt/nondefault/install/location/www:/opt/nondefault/install/location/lib64 ``` -------------------------------- ### Run ARSLOAD as a Started Task Source: https://www.ibm.com/docs/en/cmofz/10.5_topic=overview-running-content-manager-ondemand-server-commands This section details how to run ARSLOAD as a started task. It involves submitting a job stream and executing a procedure that defines the ARSLOAD program and its necessary DD statements for libraries and output. ```jcl //ARSLOAD JOB MSGLEVEL=1 //STARTING EXEC ARSLOAD ``` ```jcl //ARSLOAD PROC //ARSLOAD EXEC PGM=ARSLOAD,REGION=0M,TIME=NOLIMIT, // PARM=('/-h ARCHIVE -C Q') //STEPLIB DD DISP=SHR,DSN=ARS.V10R5M0.SARSLOAD // DD DISP=SHR,DSN=DB2.V10R5M0.SDSNEXIT // DD DISP=SHR,DSN=DB2.V10R5M0.SDSNLOAD // DD DISP=SHR,DSN=APK.ACIF231.SAPKMOD1 //********************************************** //SYSPRINT DD SYSOUT=*,RECFM=FBA,LRECL=121,BLKSIZE=6050 //SYSOUT DD SYSOUT=* //*********************************************** //* The following 3 DD statements should be uncommented and //* customized if the PDF indexer is used. //*********************************************** //*ADOBERES DD DSN=ADOBE.PDFLIB.RESOURCE.INDEX(ADOBERES),DISP=SHR //*ADOBEFNT DD DSN=ADOBE.PDF405.PLUSP1C.ADOBEFNT.LST,DISP=SHR //*TEMPATTR DD DSN=ADOBE.PDF405.PLUSP1C.TEMPATTR,DISP=SHR ``` -------------------------------- ### XML Parameter Example for Print Command Source: https://www.ibm.com/docs/en/cmofz/10.5_topic=file-configuring-arsodfxml-elements Demonstrates how to specify arguments for a print command in an XML configuration. It shows how to pass an argument with and without a value, and specifically how to set the OUTPUTQUEUE parameter for IBM i. ```xml 133 QGPL/QPRINT ``` -------------------------------- ### Regular Expression Trigger Example for PDF Indexer Source: https://www.ibm.com/docs/en/cmofz/10.5_topic=pip-trigger This example demonstrates using a regular expression (REGEX) to define a complex matching pattern for a trigger. It specifies a pattern that matches a string starting with an uppercase 'A', followed by specific character counts and types, allowing for flexible text matching. ```text TRIGGER2=ul(1,2.25),lr(2,2.5),0,REGEX='A[a-z]{6} N[a-z]{5}’,(TYPE=GROUP) ``` -------------------------------- ### INDEXSTARTBY Configuration Example Source: https://www.ibm.com/docs/en/cmofz/10.5_topic=pip-indexstartby This example demonstrates the configuration of TRIGGER and FIELD parameters along with the INDEXSTARTBY value to define how the PDF indexer locates the first group (document) in an input file. It specifies trigger conditions and field locations relative to these triggers across pages. ```configuration TRIGGER1=ul(4.72,1.28),lr(5.36,1.45),*,'ACCOUNT' TRIGGER2=ul(6.11,1.43),lr(6.79,1.59),1,'SUMMARY' INDEX1='Account',FIELD1,FIELD2 FIELD1=ul(6.11,1.29).lr(6.63,1.45),2 FIELD2=ul(6.69,1.29),lr(7.04,1.45),2 INDEX2='Total',FIELD3 FIELD3=ul(6.11,1.43),lr(6.79,1.59),2 INDEXSTARTBY=3 ``` -------------------------------- ### ACIF FIELD Parameter for Numeric String Indexing Source: https://www.ibm.com/docs/en/cmofz/10.5_topic=parameters-field Example of a FIELD parameter used to create indexes for sorted values. This specific example locates a 10-character numeric string starting in column three, utilizing a MASK for precise matching. ```assembly FIELD4=*,*,10,(OFFSET=(3:12),MASK='##########',ORDER=BYROW) ``` -------------------------------- ### Example ARSSOCKD Configuration Output Source: https://www.ibm.com/docs/en/cmofz/10.5_topic=arssockd-examples This is an example of the output generated when using the 'arssockd -I instance -q' command. It details various parameters such as port numbers, instance owner, configuration file paths, database settings, and trace configurations. This output is crucial for troubleshooting and understanding the instance setup. ```text Command: ARSSOCKD Version: Operating System: Operating System Version: Database: Database Version: Storage Manager: Storage Manager Version: Instance: ARCHIVE [@SRV@_ARCHIVE] PORT=1445 SRVR_INSTANCE=ARCHIVE SRVR_INSTANCE_OWNER=root SRVR_OD_CFG=/opt/IBM/ondemand/V10.5/config/ars.cfg SRVR_DB_CFG=/opt/IBM/ondemand/V10.5/config/ars.dbfs SRVR_SM_CFG=/opt/IBM/ondemand/V10.5/config/ars.cache SSL_PORT=14450 SSL_KEYRING_FILE=/opt/IBM/ondemand/V10.5/config/ondemand.kdb SSL_KEYRING_STASH=/opt/IBM/ondemand/V10.5/config/ondemand.sth SSL_KEYRING_LABEL=IBM Content Manager OnDemand SSL_CLNT_USE_SSL=0 PROTOCOL=2 [CFG] ARS_LANGUAGE=ENU ARS_ORIGINAL_CODEPAGE=923 ARS_NUM_DBSRVR=4 ARS_TMP=/ondemand/arstmp/logs/db2 ARS_PRINT_PATH=/ondemand/arstmp/logs/db2 ARS_DB_ENGINE=DB2 ARS_DB_IMPORT=0 DB2INSTANCE=archive ARS_DB2_DATABASE_PATH=/ondemand/arsdb ARS_DB2_PRIMARY_LOGPATH=/ondemand/arsdb_primarylog ARS_DB2_LOGFILE_SIZE=1000 ARS_DB2_LOG_NUMBER=40 ARS_DB2_TSM_CONFIG=/usr/tivoli/tsm/client/api/bin64/dsm.opt.db2 ARS_STORAGE_MANAGER=TSM ARS_TRACE_SETTINGS=/opt/IBM/ondemand/V10.5/config/archive.trace.settings DSMI_DIR=/usr/tivoli/tsm/client/api/bin64 DSMI_CONFIG=/usr/tivoli/tsm/client/api/bin64/dsm.opt DSMI_LOG=/tmp [DBFS] DBFS1=/ondemand/arsdb/SMS SMS DBFS_NUM=1 [CACHE] SMFS1=/ondemand/arscache/db2 SMFS_NUM=1 ```