View previous topic :: View next topic
|
Author |
Message |
vijayamadhuri
Active User
Joined: 06 Apr 2005 Posts: 180
|
|
|
|
I have daily file of the format
NEW-1-YEAR-PLAN AA1 2006-02-02 0000020 078.00
NEW-2-YEAR-PLAN AA2 2006-02-02 0000000 000.00
NEW-3-YEAR-PLAN AA3 2006-02-02 0000000 000.00
NEW-4-YEAR-PLAN AA4 2006-02-02 0000000 000.00
NEW-5-YEAR-PLAN AA5 2006-02-02 0000000 000.00
USED-1-YEAR-PLAN AAC1 2006-02-02 0000000 000.00
USED-2-YEAR-PLAN AAC2 2006-02-02 0000000 000.00
USED-3-YEAR-PLAN AAC3 2006-02-02 0000000 000.00
USED-4-YEAR-PLAN AAC4 2006-02-02 0000000 000.00
USED-5-YEAR-PLAN AAC5 2006-02-02 0000000 000.00
NOW I HAVE TO GENERATE A FILE--month-end-output-file
NEW-1-YEAR-PLAN AA1 2006-02-02 0000600 46800.00
NEW-2-YEAR-PLAN AA2 2006-02-02 0000000 000.00
NEW-3-YEAR-PLAN AA3 2006-02-02 0000000 000.00
NEW-4-YEAR-PLAN AA4 2006-02-02 0000000 000.00
NEW-5-YEAR-PLAN AA5 2006-02-02 0000000 000.00
USED-1-YEAR-PLAN AAC1 2006-02-02 0000000 000.00
USED-2-YEAR-PLAN AAC2 2006-02-02 0000000 000.00
USED-3-YEAR-PLAN AAC3 2006-02-02 0000000 000.00
USED-4-YEAR-PLAN AAC4 2006-02-02 0000000 000.00
USED-5-YEAR-PLAN AAC5 2006-02-02 0000000 000.00
I Have to generate the month end-output file with the respective counts.Suppose I sell 20 AA1 PLANS /DAY(assuming 30 days) so in the month end i sould have a count saying 600 and the corresponding amount .Similarly for the other plans.
Is there a syncsort step to do this .JCL,please. |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
HI,
Quote: |
I Have to generate the month end-output file with the respective counts.Suppose I sell 20 AA1 PLANS /DAY(assuming 30 days) so in the month end i sould have a count saying 600 and the corresponding amount .Similarly for the other plans. |
I believ you need to write a cobol program for this.
Regards
Rupesh |
|
Back to top |
|
|
bonniem
New User
Joined: 09 Aug 2005 Posts: 67
|
|
|
|
I thin this can be done using the SUM feature of sort. You can sort on the Plans field and sum on the amount fields. I do not have a sample control card, just get hold of some sort tutorial, you should get it. |
|
Back to top |
|
|
mallikannasagaram
New User
Joined: 21 Feb 2006 Posts: 9 Location: india
|
|
|
|
Hi vijayamadhuri,
You can do that using SUM FIELDS option.
SUM FIELDS=(<starting position>,<length>,<type>)
for example:
---------------
SUM FIELDS=(77,9,PD, * count sold
86,9,PD) * sold amount
Note:
'* count sold' and 'sold amount' are comments.
Thanks
Mallik |
|
Back to top |
|
|
|