View previous topic :: View next topic
|
Author |
Message |
cvadlamudi
New User
Joined: 19 Apr 2007 Posts: 68 Location: India
|
|
|
|
Hi,
Please can anyone have a look into this,
I just want to Dynamically populate the Header for a specific field, while creating the report.
For example :
If i get the file from source 1, then the first field in the header should be
FLD11111 FLDA FLDB FLDC FLDD
If the file from source 2, then it should be
FLD22222 FLDA FLDB FLDC FLDD
The data used to display in both the Report lines are same, Only have to differentiate the Field Heading FLD11111 or FLD22222.
Thanks,
Mouli |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please post your report definition as well as the code that relates to the fields on the report. Also please post an example of the "real" report (something more descriptive than flda, fldb, etc.). |
|
Back to top |
|
|
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 171 Location: India
|
|
|
|
Hi cvadlamudi,
Declare a working storage
For eg; WS-FILED1 8 A
then If you get the file from source 1, then move the FLD11111 to first field in the header.
I hope it should work. |
|
Back to top |
|
|
cvadlamudi
New User
Joined: 19 Apr 2007 Posts: 68 Location: India
|
|
|
|
Hi Dick,
Please find the below details to display the report.
.
IN-TRANS01 11 8 A HEADING('PROCESSED' 'XXX MONTH')
IN-AMT 19 7 N 2 HEADING('TRANSACTION' 'AMT')
.
.
REPORT RPTA LINESIZE 132
SEQUENCE IN-TRANS01
CONTROL IN-TRANS01 NEWPAGE
TITLE 1 'PROCESSED TRANSACTIONS'
LINE 1 IN-TRANS01 IN-AMT
As per the above code the report will look as
-------------------------------------------------------------------
PROCESSED TRANSACTION
PROCESSED TRANSACTION
XXX MONTH AMT
0001 777.88
0001 879.99
-------------------------------------------------------------------
PROCESSED TRANSACTION
PROCESSED TRANSACTION
XXX MONTH AMT
0002 777.88
0002 879.99
-------------------------------------------------------------------
The XXX should be dynamically changed
If 0001 then 'JAN'
If 0002 then 'FEB'
If 0003 then 'MAR'
.
.
Hope the inputs will help.
Thanks,
Mouli |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You can use a "field-name" in the TITLE. Just create a field and in the code move the appropriate month abbreviation to the field. |
|
Back to top |
|
|
|