• Rajesh A R

F1 for Mainframe

F1 for Mainframe

Tag Archives: after line

EASYTRIEVE – Special-name Report Procedures

21 Wednesday Mar 2012

Posted by rajeshar in EASYTRIEVE

≈ Leave a comment

Tags

after break, after line, before break, before line, easytrieve, endpage, mainframe, report input, special name report procedures, termination

EASYTRIEVE – Special-name Report Procedures

Report procedures are invoked at specific points of the report processing activity. By analyzing these points, you can determine the specific use of the various procedures. The exhibit that follows illustrates the procedures listed below:

REPORT-INPUT – A REPORT-INPUT procedure selects and/or modifies report input data.
This procedure is performed for each PRINT statement (report input). In order to cause the data to continue into report processing, you must execute a SELECT statement for the associated input data. In other words, input that does not get SELECTed is bypassed for continued processing.

The below example illustrates use of the REPORT-INPUT procedure in final report input selection. The first 10 report inputs for each code are the only ones selected for ultimate report input:

DEFINE COUNT S 2 P 0

DEFINE HOLD-CODE S CODE

…

REPORT-INPUT. PROC

IF CODE NE HOLD-CODE

HOLD-CODE = CODE

COUNT = 0

END-IF

IF COUNT LT 10

COUNT = COUNT + 1

SELECT

END-IF

END-PROC

BEFORE-LINE and AFTER-LINE

A BEFORE-LINE procedure is invoked immediately before, and an AFTER-LINE procedure immediately following, the printing of each detail line. These procedures are typically used for special annotation associated with these detail lines.

DEFINE COUNT S 2 P 0

…

AFTER-LINE. PROC (could be BEFORE-LINE)

IF COUNT EQ 4

DISPLAY ‘ ‘

COUNT = 0

ELSE

COUNT = COUNT + 1

END-IF

END-PROC

BEFORE-BREAK

This procedure can be used in control reports to modify totals before they are printed. A typical application is to calculate averages and/or percentages for the fields totaled.

For example – Please check my other post

“EASYTRIEVE – Sample Program – Display Totals and Summary“

AFTER-BREAK

An AFTER-BREAK procedure can be used to produce a special annotation on control reports.
You can use the value of LEVEL (a system-defined field) to determine which control break is being processed.

REPORT …

CONTROL CTLN CTL1

…

AFTER-BREAK. PROC

IF LEVEL EQ 1

DISPLAY ‘TOTALS FOR DEPARTMENT’ CTL1

END-IF

END-PROC

ENDPAGE

You can use an ENDPAGE procedure to produce page footing information. It is invoked whenever end-of-page is detected. It is typically used to produce page totals or other annotations.

ENDPAGE. PROC

DISPLAY PAGE-AMT ‘ IS THE PAGE TOTAL’

DISPLAY SKIP 2 ‘CONFIDENTIAL – FOR EYES ONLY’

END-PROC

TERMINATION

A TERMINATION procedure is invoked at the end of the report. You can use this procedure to print report footing information, including control totals and distribution information. The next exhibit is an example of report footing:

…

TERMINATION. PROC

DISPLAY NEWPAGE

DISPLAY GRAND-TOTAL ‘ IS THE CONTROL TOTAL’

DISPLAY SKIP 5 ‘ROUTE TO: …’

…

END-PROC

——————————————————————————————————–

In United States, If you would like to Earn Free Stocks, Credit card Points and Bank account Bonuses, Please visit My Finance Blog

——————————————————————————————————–

You may also like to look at:

Working on Mainframes – Is Change to a different technology necessary
Important SQL CODES and ABEND CODES
SORT JOIN – TO JOIN TWO FILES BASED ON A KEY
KNOW YOUR MAINFRAME
REXX – INITIAL SETUP
EASYTRIEVE – A023 ABEND
EASYTRIEVE – SORT and FILE COMPARISION
EASYTRIEVE – Special-name Report Procedures
EASYTRIEVE – REPORT STAEMENT
EASYTRIEVE – Sample Program – Table And Search
EASYTRIEVE – Sample Program – Display Totals and Summary
EASYTRIEVE – Sample Program – Display Employee Data
CA-Easytrieve/Plus – Basics
REXX TOOL # 02 – FSAVE – Save member opened in VIEW mode
REXX TOOL # 01 – O – Open Any Mainframe Element from any ISPF Screen
REXX – INDEX, POS, SUBSTR, COMPARE
REXX – READ THE DSN PROVIDED AS DD IN JCL
REXX – SEND MULTIPLE ARGUMENTS THROUGH JCL
REXX – HOW TO COMPILE YOUR REXX EXEC
REXX – CHANGE UPPER TO LOWER CASE
REXX – GET LAST 4 DAYS FROM GIVEN DATE
REXX – PANEL Definition
REXX – READ, CREATE AND WRITE DATA TO A DATASET
REXX TOOL TO SUBSTITUTE SYMBOLICS IN A PROC

 

Advertisement

Rate this:

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • November 2020
  • July 2020
  • February 2020
  • January 2020
  • September 2019
  • August 2019
  • October 2018
  • April 2018
  • March 2018
  • December 2017
  • October 2017
  • August 2017
  • July 2017
  • June 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • May 2016
  • March 2016
  • February 2016
  • January 2016
  • May 2015
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • January 2013
  • December 2012
  • November 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • April 2011
  • March 2011
  • August 2009
  • June 2009
  • April 2009

Categories

  • Azure
  • CA7
  • CICS
  • COBOL
    • Keywords
  • DB2
  • EASYTRIEVE
  • FILEAID
  • FILEMAXX
  • IMS
  • ISPF
  • JCL
  • KNOW YOUR MAINFRAME
  • Mainframe Migration
  • MAINFRAMES
  • Others
  • REXX
  • SDSF
  • SORT
  • Training
  • TSQL
  • VSAM

Meta

  • Register
  • Log in

Blog at WordPress.com.

  • Follow Following
    • F1 for Mainframe
    • Join 88 other followers
    • Already have a WordPress.com account? Log in now.
    • F1 for Mainframe
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar