How to handle titles and headings in an AFTER-LINE PROC in CA Easytrieve

Document ID : KB000056130
Last Modified Date : 14/02/2018
Show Technical Document Details

Are you an CA Easytrieve user with problems obtaining titles and headings when performing DISPLAY NEWPAGE in an AFTER-LINE procedure?

NEWPAGE is not supported in an AFTER-LINE procedure. To obtain titles and headings update your report with SEQUENCE and CONTROL statements. For example, the following sample program prints two reports. The first report has a DISPLAY NEWPAGE in the AFTER-LINE procedure but does not print titles and headings. The second report has an AFTER-LINE DISPLAY and also prints the correct titles and headings generated by the CONTROL statement.

 1/08/04 11.12.28                             CA-EASYTRIEVE PLUS-6.4 0311                                      PAGE    1
                                        COMPUTER ASSOCIATES INTL. -ALL31ON  PDS
PROGRAMS AND ALL SUPPORTING MATERIALS COPYRIGHT (C) 1982, 1996 BY COMPUTER ASSOCIATES INTL. INC.
     1 PARM LINK(EZCNTRL R) DEBUG (FLOW) ABEXIT SNAP
     2 FILE PERSNL1 FB (150 1800)
     3 REGION         1       1 N
     4 BRANCH         2       2 N
     5 SSN            4       5 P     MASK '999-99-9999' -
                                      HEADING('SOCIAL' 'SECURITY' 'NUMBER')
     6 EMP#           9       5 N     HEADING('EMPLOYEE' 'NUMBER')
     7 EMPNAME       17      16 A     HEADING 'EMPLOYEE NAME'
     8 NAME-LAST  EMPNAME     8 A     HEADING('LAST' 'NAME')
     9 NAME-FIRST EMPNAME +8  8 A     HEADING('FIRST' 'NAME')
    10 ADDRESS         37      39 A
    11    ADDR-STREET     37    20 A     HEADING 'STREET'
    12    ADDR-CITY       57    12 A     HEADING 'CITY'
    13    ADDR-STATE      69     2 A     HEADING 'STATE'
    14    ADDR-ZIP        71     5 N     HEADING('ZIP' 'CODE')
    15    PAY-NET         90       4 P 2   HEADING('NET' 'PAY')
    16 PAY-GROSS          94       4 P 2   HEADING('GROSS' 'PAY')
    17 *************************************************************
    18 WS-COUNTER1  S  6 P 0
    19 WS-COUNTER2  S  6 P 0
    20 *************************************************************
    21 JOB INPUT PERSNL1
    22 WS-COUNTER1 = WS-COUNTER1 + 1
    23 WS-COUNTER2 = WS-COUNTER2 + 1
    24 PRINT REPORT1
    25 PRINT REPORT2
    26 *
    27 REPORT REPORT1 LINESIZE 65
    28 TITLE 1 'REPORT NUMBER 1'
    29 TITLE 2 'REPORT NUMBER 1'
    30 LINE 01 REGION BRANCH NAME-LAST PAY-NET
    31 *
    32 AFTER-LINE. PROC
    34 IF REGION = 1
    35  DISPLAY 'THIS IS REGION 1 AFTER-LINE PROC'
    36 END-IF
    37 IF REGION = 2
    38  DISPLAY NEWPAGE
    39  DISPLAY 'THIS IS REGION 2 AND THERE ARE NO HEADINGS'
    40 END-IF
    41 END-PROC
    42 *
    43 TERMINATION. PROC
    45 DISPLAY SKIP 5 'THIS IS THE REPORT NUMBER 1 TERMINATION PROC'
    46 DISPLAY SKIP 5 'THIS IS WS-COUNTER1 ==> ' WS-COUNTER1
    47 DISPLAY SKIP 5 'THIS IS THE  END OF REPORT NUMBER 1'
    48 END-PROC
    49 *
    50 REPORT REPORT2 LINESIZE 65
    51 SEQUENCE REGION BRANCH NAME-LAST
    52 CONTROL REGION NEWPAGE
    53 TITLE 1 'REPORT NUMBER 2'
 1/08/04 11.12.28                             CA-EASYTRIEVE PLUS-6.4 0311                                      PAGE    2
                                        COMPUTER ASSOCIATES INTL. -ALL31ON  PDS
PROGRAMS AND ALL SUPPORTING MATERIALS COPYRIGHT (C) 1982, 1996 BY COMPUTER ASSOCIATES INTL. INC.
    54 TITLE 2 'REPORT NUMBER 2'
    55 LINE 01 REGION BRANCH NAME-LAST PAY-NET
    56 *
    57 AFTER-LINE. PROC
    59 IF REGION = 1
    60  DISPLAY 'THIS IS REGION 1 AFTER-LINE PROC'
    61 END-IF
    62 IF REGION = 2
    63  DISPLAY 'THIS IS REGION 2 AND THERE ARE HEADINGS'
    64 END-IF
    65 END-PROC
    66 *
    67 TERMINATION. PROC
    69 DISPLAY SKIP 5 'THIS IS THE REPORT NUMBER 2 TERMINATION PROC'
    70 DISPLAY SKIP 5 'THIS IS WS-COUNTER2 ==> ' WS-COUNTER2
    71 DISPLAY SKIP 5 'THIS IS THE  END OF REPORT NUMBER 2'
    72 END-PROC
    73 *
******************************************************
REPORT1 without the expected title and heading
******************************************************
 
 1/08/04                 REPORT NUMBER 1             PAGE      1
                         REPORT NUMBER 1
 
                                 LAST        NET
             REGION   BRANCH     NAME        PAY
               1        01     WIMN          251.65
THIS IS REGION 1 AFTER-LINE PROC
               1        02     BERG          547.88
THIS IS REGION 1 AFTER-LINE PROC
               1        03     CORNING       103.43
THIS IS REGION 1 AFTER-LINE PROC
               1        02     NAGLE         340.59
THIS IS REGION 1 AFTER-LINE PROC
               1        04     ARNOLD        356.87
THIS IS REGION 1 AFTER-LINE PROC
               1        03     MANHART       250.89
THIS IS REGION 1 AFTER-LINE PROC
               1        04     TALL          355.19
THIS IS REGION 1 AFTER-LINE PROC
               1        01     BRANDOW       554.31
THIS IS REGION 1 AFTER-LINE PROC
               1        04     LARSON        215.47
THIS IS REGION 1 AFTER-LINE PROC
               1        04     BYER          259.80
THIS IS REGION 1 AFTER-LINE PROC
               2        01     HUSS          223.71
THIS IS REGION 2 AND THERE ARE NO HEADINGS
               2        02     POWELL        167.96
THIS IS REGION 2 AND THERE ARE NO HEADINGS
               2        03     MCMAHON       283.19
THIS IS REGION 2 AND THERE ARE NO HEADINGS
               2        03     FORREST        13.19
THIS IS REGION 2 AND THERE ARE NO HEADINGS
               2        04     POST          206.60
THIS IS REGION 2 AND THERE ARE NO HEADINGS
               2        03     PETRIK        154.70
THIS IS REGION 2 AND THERE ARE NO HEADINGS
               2        05     VETTER        189.06
THIS IS REGION 2 AND THERE ARE NO HEADINGS
               2        02     KRUSE         182.09
THIS IS REGION 2 AND THERE ARE NO HEADINGS
               2        05     LOYAL         230.50
THIS IS REGION 2 AND THERE ARE NO HEADINGS
               2        03     DENNING       109.60
THIS IS REGION 2 AND THERE ARE NO HEADINGS
               3        01     WEST          429.62
               3        02     THOMPSON      187.40
               3        02     SMOTH         202.43
               3        03     NORIDGE       242.25
               3        03     ROGERS        230.17
               3        04     GREEN         238.04
               3        01     KELLY         145.51
               3        02     ISAAC         219.91
               3        03     STRIDE        272.53
               3        04     MALLOW        195.13
               3        02     LACH          215.91
               3        03     EPERT         224.36
               3        03     OSMON         411.05
               3        02     GRECO         685.23
               3        04     CROCI         215.95
               3        02     REYNOLDS      134.03
               3        01     PHILPS        213.76
               3        01     YOUNG         229.69
               3        03     MILLER        222.61
               4        01     TALUS         279.56
               4        02     JOHNSON       451.92
               4        01     WARD          141.47
               4        03     ZOLTAN         25.00
               4        03     JONES         560.63
               4        02     HAFER          96.64
               4        04     JUDAR         459.57
               4        03     WALTERS       282.45
               4        01     RYAN          291.70
 
THIS IS THE REPORT NUMBER 1 TERMINATION PROC
 
THIS IS WS-COUNTER1 ==>             48
 
THIS IS THE  END OF REPORT NUMBER 1
 
******************************************************
REPORT21 with the expected title and heading
******************************************************
 

 1/08/04                 REPORT NUMBER 2             PAGE      1
                         REPORT NUMBER 2
 
                               LAST          NET
           REGION   BRANCH     NAME          PAY
             1        01     BRANDOW          554.31
THIS IS REGION 1 AFTER-LINE PROC
                      01     WIMN             251.65
THIS IS REGION 1 AFTER-LINE PROC
                      02     BERG             547.88
THIS IS REGION 1 AFTER-LINE PROC
                      02     NAGLE            340.59
THIS IS REGION 1 AFTER-LINE PROC
                      03     CORNING          103.43
THIS IS REGION 1 AFTER-LINE PROC
                      03     MANHART          250.89
THIS IS REGION 1 AFTER-LINE PROC
                      04     ARNOLD           356.87
THIS IS REGION 1 AFTER-LINE PROC
                      04     BYER             259.80
THIS IS REGION 1 AFTER-LINE PROC
                      04     LARSON           215.47
THIS IS REGION 1 AFTER-LINE PROC
                      04     TALL             355.19
THIS IS REGION 1 AFTER-LINE PROC
             1                              3,236.08
 1/08/04                 REPORT NUMBER 2             PAGE      2
                         REPORT NUMBER 2
 
                               LAST          NET
           REGION   BRANCH     NAME          PAY
             2        01     HUSS             223.71
THIS IS REGION 2 AND THERE ARE HEADINGS
                      02     KRUSE            182.09
THIS IS REGION 2 AND THERE ARE HEADINGS
                      02     POWELL           167.96
THIS IS REGION 2 AND THERE ARE HEADINGS
                      03     DENNING          109.60
THIS IS REGION 2 AND THERE ARE HEADINGS
                      03     FORREST           13.19
THIS IS REGION 2 AND THERE ARE HEADINGS
                      03     MCMAHON          283.19
THIS IS REGION 2 AND THERE ARE HEADINGS
                      03     PETRIK           154.70
THIS IS REGION 2 AND THERE ARE HEADINGS
                      04     POST             206.60
THIS IS REGION 2 AND THERE ARE HEADINGS
                      05     LOYAL            230.50
THIS IS REGION 2 AND THERE ARE HEADINGS
                      05     VETTER           189.06
THIS IS REGION 2 AND THERE ARE HEADINGS
             2                              1,760.60
 1/08/04                 REPORT NUMBER 2             PAGE      3
                         REPORT NUMBER 2
 
                               LAST          NET
           REGION   BRANCH     NAME          PAY
             3        01     KELLY            145.51
                      01     PHILPS           213.76
                      01     WEST             429.62
                      01     YOUNG            229.69
                      02     GRECO            685.23
                      02     ISAAC            219.91
                      02     LACH             215.91
                      02     REYNOLDS         134.03
                      02     SMOTH            202.43
                      02     THOMPSON         187.40
                      03     EPERT            224.36
                      03     MILLER           222.61
                      03     NORIDGE          242.25
                      03     OSMON            411.05
                      03     ROGERS           230.17
                      03     STRIDE           272.53
                      04     CROCI            215.95
                      04     GREEN            238.04
                      04     MALLOW           195.13
             3                              4,915.58
 1/08/04                 REPORT NUMBER 2             PAGE      4
                         REPORT NUMBER 2
 
                               LAST          NET
           REGION   BRANCH     NAME          PAY
             4        01     RYAN             291.70
                      01     TALUS            279.56
                      01     WARD             141.47
                      02     HAFER             96.64
                      02     JOHNSON          451.92
                      03     JONES            560.63
                      03     WALTERS          282.45
                      03     ZOLTAN            25.00
                      04     JUDAR            459.57
             4                              2,588.94
                                           12,501.20
 

THIS IS THE REPORT NUMBER 2 TERMINATION PROC
 
THIS IS WS-COUNTER2 ==>             48
 
THIS IS THE  END OF REPORT NUMBER 2
 1/08/04 11.12.30                             CA-EASYTRIEVE PLUS-6.4 0311                                      PAGE    1
                                        COMPUTER ASSOCIATES INTL. -ALL31ON  PDS
PROGRAMS AND ALL SUPPORTING MATERIALS COPYRIGHT (C) 1982, 1996 BY COMPUTER ASSOCIATES INTL. INC.
FILE STATISTICS - CA-EASYTRIEVE PLUS 6.4 0311- 1/08/04-11.12-JSN00021
PERSNL1              48    INPUT        SAM  FIX   BLK                  150     1800
EZTR002              48    INPUT        VFM  FIX   BLK                   15      N/A