Easytrieve report based on a condition

Ask/Clarify the questions on EASYTRIEVE

Moderators: DikDude, Moderator Group

Post Reply
Latis
Member
Posts: 4
Joined: Tue Mar 09, 2010 5:08 pm

Easytrieve report based on a condition

Post by Latis » Wed Mar 10, 2010 11:32 am

How to get the report totals based on a condition.

The program reads an input file which has different record type. The report totals are claculated using CONTROL verb by deafault we get the totals. Now i have to have the totals based on different TRNS TYPE (This is one of the report fields). How to get the summary on the end of the report for this requirement.

Have a look at the code
[code]
REPORT ESEARTNS PRINTER ESEARTNS LINESIZE 133 NODATE NOADJUST
SEQUENCE BANKRPT-BH-CMPY-ID BANKRPT-DTL6-ID-NO
CONTROL FINAL NOPRINT BANKRPT-BH-CMPY-ID NEWPAGE NOPRINT

*
TITLE 1 COL 01 ' '
TITLE 2 COL 01 'RPT DATE:' RPT-DATE +
COL 41 'JP MORGAN CHASE - QWEST'
TITLE 3 COL 03 BANKRPT-BH-CMPY-ID +
COL 14 '/' +
COL 16 RPT-QWEST-ID +
COL 43 RPT-TYPE
TITLE 4 COL 03 BANKRPT-BH-CMPY-DESC
HEADING TALLY ' '
LINE 01 COL 01 BANKRPT-DTL6-ID-NO +
COL 18 BANKRPT-DTL6-NAME +
COL 42 BANKRPT-DTL6-DFI-ACCT +
COL 61 BANKRPT-DTL6-RCVG-DFI +
COL 74 RPT-EFF-DT +
COL 86 BANKRPT-DTL6-TRN-CD +
COL 89 BANKRPT-BH-CLASS-CD +
COL 93 BANKRPT-DTL6-AMT +
COL 111 BANKRPT-DTL6-CONV-FEE +
COL 120 RPT-RSN +
COL 123 TALLY
LINE 02 COL 86 RPT-RSN-DESC
LINE 03 COL 01 '_____________________________________________' +
COL 46 '_____________________________________________' +
COL 91 '___________________________________________'
LINE 04 COL 01 ' '
*
BEFORE-BREAK. PROC
IF LEVEL = 1
DISPLAY ' '
DISPLAY COL 5 ' TOTAL DEBIT JPM: ' COL 30 WS-TOTAL-DEBIT
DISPLAY COL 5 ' TOTAL RPS DEBIT: ' COL 30 WS-DTL6-AMT-DEBIT
DISPLAY COL 5 'CONVENIENCE FEE DEBITS: ' COL 38 +
WS-DTL6-CONV-FEE-DEBIT
DISPLAY COL 4 ' TOTAL CREDIT JPM: ' COL 30 WS-TOTAL-CREDIT
DISPLAY COL 4 ' TOTAL RPS CREDIT: ' COL 30 WS-DTL6-AMT-CREDIT
DISPLAY COL 4 ' TOTAL RPS CREDIT: ' COL 30 WS-DTL6-AMT-CREDIT
DISPLAY COL 4 'CONVENIENCE FEE CREDITS: ' COL 38 +
WS-DTL6-CONV-FEE-CREDIT
DISPLAY COL 6 ' TOTAL ITEMS: ' COL 35 TALLY
END-IF
END-PROC
[/code]

Can anyone advise on this..

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others