Example two: Phone bill

This example describes how to create index information for a sample telephone bill report. A telephone bill report typically contains hundreds of pages of line data.

The phone bill


Customer's phone bill

Phone Bill Data Stream

1                                                WILLIAM R. SMITH
                                                 5280 SUNSHINE CANYON DR
                                                 BOULDER CO 80000-0000
-                                                TOTAL AMOUNT DUE: $56.97
                                                 DATE DUE: JAN 29, 1993
-
-
0      1 BASIC SERVICE. . . . . . . . . . . . . .$30.56
       2 LONG DISTANCE CHARGES. . . . . . . . . .$26.41
0                                   TOTAL . . . .$56.97
-
0                                                BILL DATE: JAN 11, 1993
                                                 ACCOUNT NUMBER: 303-222-3456-6B
-
-   $66.79           $66.79        $0.00                                $0.00
                                                                       $56.97
                                                                 JAN 29, 1993
                                                                       $56.97
-
0 SUMMARY OF CURRENT CHARGES
0     RESIDENCE SERVICE                                                $25.07
      911 SURCHARGE                                                     $0.50
      CUSTOMER ACCESS SERVICE                                           $3.50
      WIRING MAINTENANCE PLAN                                           $0.50
      FEDERAL EXCISE TAX                                                $0.50
      STATE TAX                                                         $0.49
      LONG DISTANCE CHARGES (ITEMIZED BELOW)                           $30.56
0 LONG DISTANCE CHARGES
0  NO.    DATE     TIME       TO PLACE           TO AREA NUMBER  MINUTES  AMOUNT
0  1      DEC 11   7:15P      LOVELAND CO        303 666-7777      006     $0.82
   2      DEC 15   9:16A      NIWOT CO           303 555-6666      012     $1.56
   3      DEC 24   9:32P      SANTA BARBARA CA   805 999-6666      032    $15.80
   4      DEC 25   2:18P      LAS VEGAS NV       702 888-7654      015     $8.23
-                                                      TOTAL . . . . . . .$26.41
-
-
0                                                                       PAGE   1

Phone bill example ACIF parameters

/* DATA INPUT/OUTPUT CHARACTERISTICS                                                 */
CC=YES                                           /* carriage controls present        */
CCTYPE=A                                         /* ANSI carriage controls in EBCDIC */
CONVERT=YES                                      /* line data to AFP                 */
CPGID=500                                        /* code page of the input data      */
FILEFORMAT=RECORD,133                            /* fixed length records             */

/* TRIGGER/FIELD/INDEX DEFINITIONS                                                   */
TRIGGER1=*,1,X'F1',(TYPE=GROUP)                             /* 1                     */
TRIGGER2=12,50,X'C1C3C3D6E4D5E340D5E4D4C2C5D9',(TYPE=GROUP) /* ACCOUNT NUMBER        */
FIELD1=0,66,15,(TRIGGER=2,BASE=0)                           /* account number field  */
FIELD2=0,50,30,(TRIGGER=1,BASE=0)                           /* name field            */
FIELD3=11,61,12,(TRIGGER=1,BASE=0)                          /* bill date field       */
INDEX1=X'818383A36D95A494',field1,(TYPE=GROUP,BREAK=YES)       /* acct_num index     */
INDEX2=X'95819485',field2,(TYPE=GROUP,BREAK=NO)                /* cust name index    */
INDEX3=X'828993936D8481A385',field3,(TYPE=GROUP,BREAK=NO)      /* bill_date index    */

/* INDEXING INFORMATION                                                              */
IMAGEOUT=ASIS                                    /* leave image alone                */
INDEXOBJ=GROUP                                   /* group-level indexes              */
INDEXSTARTBY=1                                   /* must find index by page 1        */

/* RESOURCE INFORMATION                                                              */
CHARS=GT10                                       /* coded font for AFP               */
FORMDEF=F1PHBILL                                 /* formdef name required for AFP    */
PAGEDEF=P1PHBILL                                 /* pagedef name required for AFP    */
FDEFLIB=/usr/lpp/psf/res/fdeflib                 /* formdef directories              */
FONTLIB=/usr/lpp/psf/res/fontlib                 /* font directories                 */
OVLYLIB=/usr/lpp/psf/res/ovlylib                 /* overlay directories              */
PDEFLIB=/usr/lpp/psf/res/pdeflib                 /* pagedef directories              */
PSEGLIB=/usr/lpp/psf/res/pseglib                 /* pseg directories                 */
USERLIB=/tmp/res/phbill                          /* user resources                   */
RESTYPE=fdef,pseg,ovly                           /* 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 ACCOUNT NUMBER. Each statement can contain one or more pages. Because users should view the statements in the same format as the customer's printed copy, ACIF converts the input line data to AFP™ and collects the resources required to view the statements. The phone bill shows an example of a statement viewed with one of the Content Manager OnDemand client programs. The Phone Bill Data Stream shows what the input data looks like viewed with an ISPF browser on the z/OS® system. Because the input data is encoded in EBCDIC, the ACIF trigger and index parameter values must be coded in hexadecimal.

For ease of retrieval, the report should be segmented into groups of pages, with one statement in each group. One index row should be generated for each group. The row contains three user-defined indexes: the account number, the customer's name, and the bill date. The Phone bill example ACIF parameters shows the ACIF indexer parameters required to process the data on a UNIX operating system.