Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Is there a syncsort step to do this JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Is there a syncsort step to do this JCL
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: 464

PostPosted: Thu Feb 23, 2006 9:27 am    Post subject: Re: syncsort
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    Post subject:
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    Post subject: Re: Is there a syncsort step to do this JCL
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 6 Fri Sep 22, 2017 7:08 am
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us