Previous Topic: What You Can DoNext Topic: Demonstration (2): Using a KEEP Clause


Demonstration (1): Changing Report Numbers and Character Strings

Objective

This report is derived from stored code. The code is changed to provide updated branch office account activity information.

Procedure

Complete Code

col. 2
▼
IN 80 F
USE *
    CHANGE RPTNO TO 01 AND                 $Chained together with AND
         '51*010' 4/9 TO '410010' AND
         'ACCOUNT ACTIVITY BY BRANCH' TO 'BRANCH ACCOUNTS'
REC T-ACCOUNT     1     5          'ACCOUNT'
REC T-TRANS-IND   6     1          'DEPOSIT/' 'WITHDRAWAL'
REC T-TRANS-AMT   7    11  2 DP=2  'AMOUNT OF' 'TRANSACTION'
REC T-DATE       18     6  2       'DATE'
REC T-BRANCH     24     2
REC T-NAME       26    20          'NAME'
80OUT D                                           $Report number changed
80SORT T-BRANCH 1
803 ACCOUNT ACTIVITY BY BRANCH                    $Title changed
8051*010 T-BRANCH                                 $Changed to a type 4 parameter
8051*020 T-ACCOUNT               HR
8051*030 T-NAME                  HR
8051*050 T-TRANS-AMT             HR
8051*060 T-TRANS-IND             HR
8051*070 T-DATE  FD              HR
END

Result

Sequential Parameter Listing

mm/dd/yy              SEQUENTIAL PARAMETER LISTING      volser Vnn.n  PAGE     1 00 ** SYSIN **                            IN 80 F    C200138 INSTALLATION SECURITY OPTION IS NO                                            USE *                                                CHANGE RPTNO TO 01 AND                 $Chained together with AND                                                     '51*010' 4/9 TO '410010' AND                                                     'ACCOUNT ACTIVITY BY BRANCH' TO 'BRANCH ACCOUNTS' 01 ** SYSIN **                             REC T-ACCOUNT     1     5         'ACCOUNT'                                            REC T-TRANS-IND   6     1         'DEPOSIT/' 'WITHDRAWAL'                                            REC T-TRANS-AMT   7    11  2 DP=2  'AMOUNT OF' 'TRANSACTION'                                            REC T-DATE       18     6  2       'DATE'                                            REC T-BRANCH     24     2                                            REC T-NAME       26    20          'NAME'                                            01OUT D                                           $Report number changed                                            01SORT T-BRANCH 1                                            013 BRANCH ACCOUNTS                    $Title changed                                            01410010 T-BRANCH                                 $Changed to a type 4 parameter                                            0151*020 T-ACCOUNT               HR                                            0151*030 T-NAME                  HR                                            0151*050 T-TRANS-AMT             HR                                            0151*060 T-TRANS-IND             HR                                            0151*070 T-DATE  FD              HR                                            END

Report

REPORT NO. 01                            BRANCH ACCOUNTS                          mm/dd/yy PAGE     1           32                                                                  AMOUNT OF                DEPOSIT/             ACCOUNT                    NAME                     TRANSACTION              WITHDRAWAL              DATE              15060             SHARON ARMSTRONG                     10,099.01                D                 mm/dd/yy              15060             SHARON ARMSTRONG                        990.11                W                 mm/dd/yy              15060             SHARON ARMSTRONG                    100,990.11                D                 mm/dd/yy              16070             ARTHUR LINK                           1,080.04                D                 mm/dd/yy              19235             GARY NOBLES                              80.04                W                 mm/dd/yy              21056             AMOS JOHNSON                              1.02                W                 mm/dd/yy REPORT NO. 01                            BRANCH ACCOUNTS                               mm/dd/yy PAGE     2           35                                                                  AMOUNT OF                DEPOSIT/             ACCOUNT                    NAME                     TRANSACTION              WITHDRAWAL              DATE              23055             JACK JACKSON                            500.00                W                 mm/dd/yy              23055             JACK JACKSON                         50,000.00                D                 mm/dd/yy              23055             JACK JACKSON                             30.00                D                 mm/dd/yy              29557             IRWIN TRIMBLE                       500,001.00                D                 mm/dd/yy

Note: The report would show actual dates in the format shown.