IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is there a syncsort step to do this JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vijayamadhuri

Active User


Joined: 06 Apr 2005
Posts: 180

PostPosted: Thu Feb 23, 2006 4:21 am
Reply with quote

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
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Thu Feb 23, 2006 9:27 am
Reply with quote

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
View user's profile Send private message
bonniem

New User


Joined: 09 Aug 2005
Posts: 67

PostPosted: Thu Feb 23, 2006 10:23 am
Reply with quote

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
View user's profile Send private message
mallikannasagaram

New User


Joined: 21 Feb 2006
Posts: 9
Location: india

PostPosted: Thu Feb 23, 2006 4:14 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Forcing a step to run (even if abended) JCL & VSAM 8
Search our Forums:

Back to Top