Previous Topic: Create and Add Work Fields to a ReportNext Topic: Modify Selection Criteria


Modify and Create Table Processing

In the CA Earl language, the DECODE statement is used for table processing.

The copy member RCTAB (shown beginning line 94 of the original program) illustrates one kind of table processing. The RCTAB table translates the return code number into an English description of the logging or violation. By adjusting the RCTAB copy member, you can modify this table. You can find the RCTAB table in the EARLLIB MACLIB for CA ACF2 for VM sites and in the CAI.CAIMAC library for CA ACF2 for z/OS and OS/390 sites.

Use the DECODE statement for less complex translations. In the following example, the DECODE statement edits the hour portion of the time from military to common format.

Note: If you are sorting based on time, you need to retain the old time format somewhere in the report.

     DECODE HOUR INTO HOUR
          < 13 = HOUR
          > 12 = (HOUR ‑ 12)

The above program modification produces the following changes in this report.

03/29/02                           LOGON AND PASSWORD VIOLATIONS

                 STARTING DATE: 03‑29‑02    ENDING DATE: 03‑29‑02
                 STARTING TIME: 10.59       ENDING TIME:  3.04 
‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
     DATE   TIME         LOGONID   JOBNAME   SUBMITTOR  SOURCE     PROGRAM    REA 
                                            LID/PROC                           C 
‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ 
03‑29‑02  10.59.30  AM  AUEJJV                         H06L84F 
03‑29‑02  11.09.55  AM  TLCISO    STARMAN   STARMAN    USCHGOVB 
03‑29‑02  11.21.50  AM  TLCISO    TLCISO    LOGON      V4L3ED 
03‑29‑02   1.24.58  PM  SSESWB    SSESWB    LOGON      V4L3E0 
03‑29‑02   2.02.48  PM  SVNSKS    SVNSKS    LOGON      V4L3EA 
03‑29‑02   2.20.10  PM  TSTRJM                         H06L867 
03‑29‑02   2.43.44  PM  CICSID9   SSELHS5   SSECICS    T86C       SSD5 
03‑29‑02   2.44.28  PM  CICSID9   SSELHS5   SSECICS    T827       SSD5 
03‑29‑02   2.44.55  PM  CICSID8   SSELHS5   SSECICS    T827       SSD5 
03‑29‑02   2.48.36  PM  AUEDRL                         H06L83D