Objective
This example uses a DEFAULT clause to produce the same report as the example using a WITH VALUES clause.
Procedure
The value given on the WITH VALUES clause (mmddyy) overrides the value on the DEFAULT clause, where mmddyy would be actual dates in this format.
Complete Code
Below follows the job stream and the stored code:
The Job Stream
USE RPT627 WITH VALUES (RPT-DAY=mmddyy) $Overriding value /*
Note: The rpt-day value would show actual dates in the format shown.
The Stored Code
col. 2
▼
DEFAULT &.&1=START=mmddyy. $Default values if not overridden
&.&2=END=mmddyy.
&.&3=RPT-DAY=mmddyy.
&.&4=TITLE='MONTHLY. REPORT'
IN 80
REC ACCOUNT 1 5 'ACCOUNT'
REC TRANS-IND 6 1 'DEPOSIT/' 'WITHDRAWAL'
REC TRANS-AMT 7 11 2 DP=2 'AMOUNT OF' 'TRANSACTION'
REC TRANS-DATE 18 6 2 'DATE'
REC BRANCH 24 2 'BRANCH'
REC NAME 26 20 'NAME'
80OUT 80
80SORT ACCOUNT 1 BRANCH NAME RPT-DAY START END
800 START &.&1.
800 END &.&2.
800 RPT-DAY &.&3.
803 &.&4.
80410010 NAME
80410030 ACCOUNT
80410040 BRANCH
80410050 RPT-DAY FD
80420010 'PERIOD: FROM'
80420024 START FD
80420034 'TO'
80420038 END FD
8051*010 TRANS-DATE FD HR
8051*020 TRANS-IND HR
8051*030 TRANS-AMT HR
8051*070 TRANS-DATE FD HR
8061*0200'TOTAL TRANSACTIONS'
8061*030 TRANS-AMT
Note: The code would show actual dates for start, end, and rpt-day in the format shown.
Result
REPORT NO. 80 MONTHLY REPORT mm/dd/yy PAGE 1 SHARON ARMSTRONG 15060 32 mm/dd/yy PERIOD: FROM mm/dd/yy TO mm/dd/yy DEPOSIT/ AMOUNT OF DATE WITHDRAWAL TRANSACTION DATE mm/dd/yy D 10,099.01 mm/dd/yy mm/dd/yy W 990.11 mm/dd/yy mm/dd/yy D 100,990.11 mm/dd/yy TOTAL TRANSACTIONS 112,079.23 REPORT NO. 80 MONTHLY REPORT mm/dd/yy PAGE 2 ARTHUR LINK 16070 32 mm/dd/yy PERIOD: FROM mm/dd/yy TO mm/dd/yy DEPOSIT/ AMOUNT OF DATE WITHDRAWAL TRANSACTION DATE mm/dd/yy D 1,080.04 mm/dd/yy TOTAL TRANSACTIONS 1,080.04
Note: The report would show actual dates in the format shown.
|
Copyright © 2014 CA.
All rights reserved.
|
|