IBM for i, Version 7.1

Define a transaction report example

The following example demonstrates how to define a transaction report using the Report Wizard and the graphical indexer. The sample report that we are archiving is a Loan Delinquency Report. Each page of the loan delinquency report contains loan records. Each record contains a unique value, the loan number. The records in the report are sorted on the loan number. We want to use the following pieces of information as indexes:
  • Report Date
  • Starting Page Number
  • Loan Number (this will be the transaction field)

As a general rule you should define triggers and fields from top left to bottom right of the report. This has the added benefit of making your indexer parameters easier to understand.

Figure 1 shows a sample page of the report.
Figure 1. Transaction Field sample report
REPORT   D33313001             ONDEMAND NATIONAL BANK                      DATE  01-15-00  
BANK     001                                                               TIME  16:03:46  
FROM     01/01/99                                                              MODE  9     
TO       12/31/99               LOAN DELINQUENCY REPORT                        PAGE  0001  
                                                                                           
    LOAN        CUSTOMER              LOAN        DELINQUENT    DELINQUENT    DELINQUENT   
   NUMBER         NAME               AMOUNT         30 DAYS       60 DAYS       90 DAYS    
                                                                                           
 0100000000  AARON, ROBERT         $10000000.00  $      50.00  $      50.00  $        .00  
 0100000001  ABBOTT, DAVID         $   11000.00  $     100.00  $     200.00  $        .00  
 0100000002  ABBOTT, DAVID         $   12000.00  $     140.00  $        .00  $        .00  
 0100000003  ABBOTT, DAVID         $   13000.00  $     150.00  $        .00  $        .00  
 0100000005  ROBINS, STEVEN        $     500.00  $      50.00  $        .00  $        .00  
 0100000006  ARNOLD, SAMUEL        $    1000.00  $      75.00  $     150.00  $     225.00  
 0100000007  PETERS, PAUL          $     650.00  $      50.00  $        .00  $        .00  
 0100000008  ROBERTS, ABRAHAM      $    9000.00  $     120.00  $        .00  $        .00  
 0100000009  SMITH, RANDOLPH       $    8000.00  $     115.00  $        .00  $        .00  
 0100000010  KLINE, PETER          $    8500.00  $     110.00  $        .00  $        .00  

To begin, first start the Content Manager OnDemand administrative client and log on to your instance's server. Next, click the Report Wizard toolbar button. Then select the data type; for the example, select SCS. Then select the sample input file. The graphical indexer should now display the spooled file.

Define the first trigger. Select the word REPORT for Trigger1. This trigger will be used to determine the start of the document, and to locate the Report Date and Starting Page Number fields.

Trigger1 is the only trigger required. Next, define fields and indexes. When using the report wizard, the fields and indexes are defined in one step. If using the graphical indexer within the application definition rather than the Report Wizard, the fields and indexes are defined in separate steps.

The first field and index are for the report date. The report date is located by using Trigger1. On the Database Field Attributes page, the report date is defined as a date data type and is selected as the segment field.

The second field and index are for the starting page number. The starting page number is located by using Trigger1. On the Database Field Attributes page, the starting page number is defined as an integer data type.

After defining all of the fields, you must change the starting page number field so that a new document group is not created each time the page number changes.

The second field and index are for the loan number. The loan number is located by using a mask. The Mask parameter is used to specify a pattern that the transaction field data must match in order to be used as an index. In the example, the field must consist of ten numeric characters (each # represents a numeric character). A transaction field does not use a trigger to locate the data, it uses the mask to define how the data must be structured, and uses any data on that page that matches that mask.

The Database Field Attributes page has specific parameters to support a transaction field. The end user of the sample report will see the folder field names. The database field names are using internally to Content Manager OnDemand and are not seen by end users.

The end user will enter search criteria (the loan number) into the field that is identified by the Query Folder Field. The document list will show two loan numbers. These are the starting and ending loan numbers of the group of the report that contains the loan number that was searched for.

The loan number is defined as a string data type.

Now you must go back and specify that the starting page number, which is Index2, should not start a new document group when the value changes. Click the Toggle select Trigger, Index, Field Parameters toolbar button.

The administrative client opens the Select dialog box.

Click on Index 2. Then click on the Properties button to open the Update an Index dialog box.

Under Break, select the No option. Click the OK button to save the starting page number index as a Break=No index. A change in the starting page number will no longer cause a new document group to be created.

Close the Select dialog box.

To verify how the system will index the document, click on the Toggle between Display and Add Parameters toolbar button.

The defined triggers will be highlighted in red. The defined fields will be highlighted in blue. The defined transactions fields will be highlighted in green.

You can now close the graphical indexer window and complete the process of using the Report Wizard to define the application group, application, and folder.

Figure 2 shows the indexer parameters that were generated for the example report.
Figure 2. Transaction Field indexer parameters
TRIGGER1=*,2,X'D9C5D7D6D9E3',(TYPE=GROUP)                          /* REPORT      */
FIELD1=0,83,8,(TRIGGER=1,BASE=0)
FIELD2=3,87,4,(TRIGGER=1,BASE=0)
FIELD3=*,*,10,(OFFSET=(3:12),MASK='##########',ORDER=BYROW)
INDEX1=X'998481A385',FIELD1,(TYPE=GROUP,BREAK=YES)                 /* rdate       */
INDEX2=X'A297818785',FIELD2,(TYPE=GROUP,BREAK=NO)                  /* spage       */
INDEX3=X'D396819540D5A494828599',FIELD3,(TYPE=GROUPRANGE,BREAK=NO) /* Loan Number */

After archiving the example report, you can start the Content Manager OnDemand client, open the new folder, and search for documents.



Feedback

Last updated: April 2013
ex400deftrafd.htm

© Copyright IBM Corporation 2014.
This information center is powered by Eclipse technology. (http://www.eclipse.org)