Example three: Income statement

This example describes how to create index information for a sample income statement report. An income statement report typically contains hundreds of pages of line data.

The income statement report

                                                            Page 1 of 5
Income Statement# 123-45-6789                                    Date: 09/1994

                              Eugene & Pearl Aardvark
                                18005 Le May Street
                                West Hills PA 12345

                              Total Income - $  2,931.26
    Type of Income - W2 Wages
    Subtotal:       1,015.00
                                              Source                 Amount
                                              The Pastry Shoppe        1,015.00
    Type of Income - Interest
    Subtotal:         491.35
                                              Source                 Amount
                                              Big Bank                   123.45
                                              TPS Credit Union           367.90
    Type of Income - SEP/IRA
    Subtotal:          50.00
                                              Source                 Amount
                                              LOTTO                       50.00
    Type of Income - Dividend
    Subtotal:          53.91
                                              Source                 Amount
                                              XVT Railroad                53.91
    Type of Income - Farm
    Subtotal:       1,321.00
                                              Source                 Amount
                                              CRP                      1,321.00

ACIF parameters for the income statement

/* DATA INPUT/OUTPUT CHARACTERISTICS                                             */
CC=YES                                          /* carriage controls present     */
CCTYPE=A                                        /* ANSI controls in EBCDIC       */
CONVERT=YES                                     /* convert line data input       */
                                                /* to AFP so that page-level     */
                                                /* indexes can be generated      */
CPGID=500                                       /* code page ID                  */
TRC=NO                                          /* table ref chars not present   */
FILEFORMAT=RECORD,133                           /* Fixed length input file       */

/* TRIGGER/FIELD/INDEX DEFINITIONS                                                     */
TRIGGER1 = *,1,X'F1',(TYPE=GROUP)                                     /* 1             */
FIELD1   = 1,73,7,(TRIGGER=1,BASE=0)                                  /* sdate field   */
INDEX1   = X'A28481A385',FIELD1,(TYPE=GROUP,BREAK=YES)                /* sdate index   */
TRIGGER2 = 1,2,X'C9958396948540E2A381A385948595A3',(TYPE=GROUP) /* Income Statement    */
FIELD2   = 0,20,11,(TRIGGER=2,BASE=0)                           /* incstmt field       */
INDEX2   = X'899583A2A394A3',field2,(TYPE=GROUP,BREAK=YES)      /* incstmt index       */
                                                                 /* Total Income     */
TRIGGER3 = *,31,X'E396A3819340C99583969485',(TYPE=GROUP,RECORDRANGE=(7,8))
FIELD3   = 0,46,10,(TRIGGER=3,BASE=0)                              /* totinc field     */
INDEX3   = X'A396A3899583',FIELD3,(TYPE=GROUP,BREAK=NO)            /* totinc index     */
TRIGGER4 = *,5,X'E3A8978540968640C99583969485',(TYPE=FLOAT)    /* Type of Income       */
FIELD4   = 0,22,12,(TRIGGER=4,BASE=0)                          /* Type of Income field */
INDEX4   = X'E3A8978540968640C99583969485',field4,(TYPE=PAGE)  /* Type of Income index */
TRIGGER5 = *,5,X'E2A482A396A38193',(TYPE=FLOAT)                    /* Subtotal         */
FIELD5   = 0,17,10,(TRIGGER=5,BASE=0)                              /* Subtotal field   */
INDEX5   = X'E2A482A396A38193',field5,(TYPE=PAGE)                  /* Subtotal index   */

/* INDEXING INFORMATION                                                           */
IMAGEOUT=ASIS                                    /* leave images alone            */
INDEXOBJ=ALL                                     /* group and page indexes        */
INDEXSTARTBY=1                                   /* must find index by page 1     */

/* RESOURCE INFORMATION                                                           */
CHARS=GT10                                       /* coded font for AFP            */
FORMDEF=F1A10110                                 /* formdef name required for AFP */
PAGEDEF=P1A08682                                 /* pagedef name required for AFP */
FDEFLIB=/usr/lpp/psf/res/fdeflib                 /* formdef directories           */
PDEFLIB=/usr/lpp/psf/res/pdeflib                 /* pagedef directories           */
RESTYPE=fdef                                     /* collect these resources       */

The report is logically segmented into statements. The beginning of a statement occurs when two conditions exist: a record that contains a skip-to-channel one carriage control and a record that contains the string Income Statement. Each statement can contain one or more pages. The income statement report shows an income statement viewed with one of the Content Manager OnDemand client programs.

For ease of retrieval, the report should be segmented into groups of pages, with one statement in each group. One index row should be created for each group. The row contains three user-defined indexes: the account number, the statement date, and the total income. In addition, page-level indexes will be generated so that users can locate the type of income and the subtotal when they view a statement. The page-level indexes are stored with the document, not in the database (you cannot use page-level indexes to search for documents). ACIF can only generate this type of page-level information when converting the input data to AFP. This type of page-level information is generated by specifying the CONVERT=YES and INDEXOBJ=ALL parameters, and by creating an index field with the TYPE=PAGE option.

ACIF parameters for the income statement shows the ACIF indexer parameters required to process the data.