OnDemand User Group

Support Forums => z/OS Server => Topic started by: Gyanendu on June 03, 2010, 04:13:16 AM

Title: Multiple indexes pointing to single document
Post by: Gyanendu on June 03, 2010, 04:13:16 AM

I need to archive AFP, PDF, HTML documents having multiple indexes pointing to single document. Is it possible to create 2 indexes (say 2 different account numbers - 001 & 002) mapped to single document stored in OAM. Do I need to use any user exit or some other method to achieve this, please sugest.

Thanks in advance !

- Gyanendu
Title: Re: Multiple indexes pointing to single document
Post by: Alessandro Perucchi on June 03, 2010, 08:34:46 AM
Hello Gyanendu,

short answer yes it is possible.

long answer, there are many possibility to do it, but the 2 that comes into my mind right now are the following:

1) You archive your document, and at the same time you archive, you want to add this new index, so in the index file you create 2 entries:

GROUP_FIELD_NAME:account_nb
GROUP_FIELD_VALUE:001
GROUP_FIELD_NAME:xxx2
GROUP_FIELD_VALUE:yyy2
...
GROUP_OFFSET:0
GROUP_LENGTH:0
GROUP_FILENAME:single_document
GROUP_FIELD_NAME:account_nb
GROUP_FIELD_VALUE:002
GROUP_FIELD_NAME:xxx2
GROUP_FIELD_VALUE:yyy2
...
GROUP_OFFSET:0
GROUP_LENGTH:0
GROUP_FILENAME:

just leave the group_filename empty, automagically CMOD will use the last filename used.

So 2 index definition for 1 document.

This works only with Generic Index

2) For this second way, you already have your documents in CMOD, and then you add a new index to an already stored document:

arsdoc add -h host -a <appl> -g <applG> -n field1=value1 -n account_nb='002' -n ... -i "where account_nb='001' and ..."

Your "-i" must select only 1 document, and then bingo you have a second index for your document!



Now, if you are using one of the indexer (ACIF, PDF, ...), then probably yes, you'll need to do that. Personally I don't have any experience with User Exit and several Index. So I cannot help you in that topic...
Maybe you can look in that direction:

http://publib.boulder.ibm.com/infocenter/cmod/v8r4m1/index.jsp?topic=/com.ibm.ondemand.indexingzos.doc/ars3d371231.htm

Cheers,
Alessandro