The following example code for the ABENDSUM canned report is based on the provided macros and shows the structure of a CA Easytrieve program. Most of the comments in this example were removed for brevity.
Note: The line numbers shown on some lines match the explanation section, but are not part of the program.
1 MACRO 0 EACH 'DAY' +
SHIFT '00:00 24:00' +
FROM 'ALL' +
TO 'ALL' +
RECTYPE 255
2 %SYSVCDEF RECTYPE &RECTYPE +
EACH '&EACH' +
FROM '&FROM' +
TO '&TO' +
SHIFT '&SHIFT' +
SEGMENT EXPCRABS
3 JOB INPUT SMFIN START SET-PARMS
4 PERFORM SELECT-REC.
IF SELECTED = 'T'
5 %SYSVFOR EXPCRABS ABENDS
END-IF
6 %SYSVPROC. *Common subroutines
7 REPORT ABENDS PRINTER REPORTS SUMMARY SUMCTL DTLCOPYALL +
SPACE 2 NOADJUST LONGDATE
SEQUENCE TITLE-TSTAMP MNS_TRAN ABS_ABNDPGM ABS_ABNDCODE
CONTROL FINAL NOPRINT TITLE-TSTAMP NEWPAGE NOPRINT MNS TRAN NOPRINT +
ABS_ABNDPGM NOPRINT ABS_ABNDCODE
TITLE 1 ' Sysview CICS Program ABEND Summary'
TITLE 2 'From: ' LOW-STAMP ' Each: &EACH'
TITLE 3 'To: ' HIGH-STAMP ' Shift: &SHIFT'
TITLE 4 'Interval Start:' TITLE-TSTAMP
HEADING MNS_TRAN ('TRAN' '----')
HEADING ABS_ABNDPGM ('PROGRAM' '--------')
HEADING ABS_ABNDCODE ('CICS' 'ABEND CODE' '--------')
HEADING ABS_ABNDOCOD ('SYSTEM' 'ABEND CODE' '--------')
HEADING TALLY ('COUNT' '------')
LINE MNS_TRAN ABS_ABNDPGM ABS_ABNDCODE TALLY
The following explanations correspond to the line numbers in the preceding example:
The following examples show how to invoke this macro:
%ABENDSUM %ABENDSUM EACH HOUR
The SEGMENT parameter identifies the primary data segment to use for the report.
The INPUT parameter identifies the SMFIN input file.
The START parameter runs the SET-PARMS subroutine, which initializes the selection criteria.
| Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |