Assigning default index values
You can create a Content Manager OnDemand application definition with an index field that does not always exist on the print page. If a value is not found for that field during indexing (if the field location does not exist on the particular print page), then the DEFAULT keyword is used to determine the default value to use. The DEFAULT keyword can be placed on the FIELD indexer parameter line of the indexer parameters for a particular application definition.
If the field location does not exist on the particular print page, and a default value is not specified, blanks are used. For string fields, this allows the load to complete successfully. For date, decimal, and integer fields, this results in the load failing.
The DEFAULT keyword can be specified in one of three ways. The first method allows you to specify an actual value (given in alphanumeric or hex format). The second method allows you to use the default value that you have specified on the Load Information tab of the Content Manager OnDemand application definition or to use index propagation. The third method allows you to use a value that is found in the first document of the input file that can be used in all of the remaining documents.
DEFAULT='your_Value'
(such as
DEFAULT='ABC'
) DEFAULT=x'your_Hex'
(such as
DEFAULT=x'C1C2C3'
)DEFAULT='_*USELOADDEFAULTORPROPAGATION*_'
orDEFAULT=x'6D5CE4E2C5D3D6C1C4C4C5C6C1E4D3E3D6D9D7D9D6D7C1C7C1E3C9D6D55C6D'
(In
this second case, the hex value specified is the hexadecimal representation
of the character string _*USELOADDEFAULTORPROPAGATION*_.)DEFAULT='_*FINDONCE*_'
orDEFAULT=X'6D5CC6C9D5C4D6D5C3C55C6D'
(In this third case, the hex value specified is the hexadecimal representation of the
character string _*FINDONCE*_.)The second method (using _*USELOADDEFAULTORPROPAGATION*_ or its hexadecimal representation) allows the load process to assign the default value from the Load Information tab of the application definition or for propagation to occur. To have the load process assign a default from the Load Information tab or by using propagation, you must specify the _*USELOADDEFAULTORPROPAGATION*_ default value or click the Use Load Default or Propagation checkbox when defining the field by using the OnDemand Administrator client.
- With propagation, the loading of the spooled file will fail if an actual field value is not found on the print page for the first document in the spooled file, since there would be nothing to propagate into that field.
- _*USELOADDEFAULTORPROPAGATION*_ cannot be used on a FIELD defined with a mask, such as MASK=##/##/##.
10/04/2006 Code: K
Account Number: 123456798
Invoice Number: 876544-11
10/04/2006
Account Number: 123456987
Invoice Number: 876545-08
The
indexer parameters might look something like this:
TRIGGER1=*,42,X'61',(TYPE=GROUP) /* / */
TRIGGER2=*,60,X'C39684857A',(TYPE=FLOAT) /* Code: */
FIELD1=0,40,10,(TRIGGER=1,BASE=0)
FIELD2=1,66,9,(TRIGGER=1,BASE=0)
FIELD3=2,66,9,(TRIGGER=1,BASE=0)
FIELD4=0,66,1,(TRIGGER=2,BASE=0,
DEFAULT=X'6D5CE4E2C5D3D6C1C4C4C5C6C1E4D3E3D6D9D7D9D6D7C1C7C1E3C9D6D55C6D')
/* _*USELOADDEFAULTORPROPAGATION*_ */
INDEX1=X'A2A381A385948595A36D8481A385',FIELD1,(TYPE=GROUP,BREAK=YES) /* statement_date */
INDEX2=X'81838396A495A36D95A494828599',FIELD2,(TYPE=GROUP,BREAK=YES) /* account_number */
INDEX3=X'8995A5968983856D95A494828599',FIELD3,(TYPE=GROUP,BREAK=YES) /* invoice_number */
INDEX4=X'83968485',FIELD4,(TYPE=GROUP,BREAK=NO) /* code */
If
you need the value of 'K' that is found for the first account number/invoice number to be
propagated to the second account number/invoice number, you would NOT specify a default for
the Code field on the Load Information page of the Content Manager OnDemand
application definition. The use of _*USELOADDEFAULTORPROPAGATION*_ without a default
specified on the Load Information page of the application causes propagation to occur. If,
instead, you need to specify a different default value (such as 'D') to be used when the
field value is not found on the page, your indexer parameters would look exactly the same as
shown in the preceding example, but you would specify the 'D' for Default Value on the Load
Information page to cause Content Manager OnDemand to assign a 'D' to the
Code field for the second account number/invoice number.- This special default value is ONLY valid for TRIGGER-based fields.
- This special default value is valid for any field type.
TRIGGER1=*,42,X'61',(TYPE=GROUP) /* / */
TRIGGER2=*,60,X'C39684857A',(TYPE=FLOAT) /* Code: */
FIELD1=0,40,10,(TRIGGER=1,BASE=0)
FIELD2=1,66,9,(TRIGGER=1,BASE=0)
FIELD3=2,66,9,(TRIGGER=1,BASE=0)
FIELD4=0,78,12,(TRIGGER=2,BASE=0,
DEFAULT=X'6D5CC6C9D5C4D6D5C3C55C6D') /* _*FINDONCE*_ */
INDEX1=X'A2A381A385948595A36D8481A385',FIELD1,(TYPE=GROUP,BREAK=YES) /* statement_date */
INDEX2=X'81838396A495A36D95A494828599',FIELD2,(TYPE=GROUP,BREAK=YES) /* account_number */
INDEX3=X'8995A5968983856D95A494828599',FIELD3,(TYPE=GROUP,BREAK=YES) /* invoice_number */
INDEX4=X'83968485',FIELD4,(TYPE=GROUP,BREAK=NO) /* code */