Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Required help on SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
vicharapusrinu
Warnings : 1

New User


Joined: 04 Dec 2006
Posts: 63
Location: Hyderabad

PostPosted: Fri Mar 07, 2014 6:53 pm    Post subject: Required help on SORT
Reply with quote

Hi All,

Would you please help me out .

Input-1
Code:
TYPE-1    100
TYPE-2    200
TYPE-1    300
TYPE-2    200
TYPE-2    100
TYPE-1    300
TYPE-1    100


Required Output
Code:
TYPE-1    100
TYPE-1    300
TYPE-1    300
TYPE-1    100
TYPE-2    200
TYPE-2    200
TYPE-2    100
888800040000800
999900030000500


in the above
888800040000800
8888-- indicates TYPE-1 related row(1 to 4 Digits)
0004-- indicates number of TYPE-1 records(5 to 8 Digits)
0000800-- indicates sum of TYPE-1 records(9 to 15 Digits)

in the above
999900030000500
9999-- indicates TYPE-2 related row (1 to 4 Digits)
0003-- indicates number of TYPE-2 records (5 to 8 Digits)
0000500--indicates sum of TYPE-2 records (9 to 15 Digits)

Many thanks for your anticipated help.


Regards,
Srini
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7306

PostPosted: Fri Mar 07, 2014 7:59 pm    Post subject: Reply to: Required help on SORT
Reply with quote

Can you post the sysout from any SORT step, so we can see your sofware level for SORT? This will tell us what functions are available on your site.
Back to top
View user's profile Send private message
vicharapusrinu
Warnings : 1

New User


Joined: 04 Dec 2006
Posts: 63
Location: Hyderabad

PostPosted: Sat Mar 08, 2014 10:42 am    Post subject: Reply to: Required help on SORT
Reply with quote

Hi

Thanks for your post,

below are the details.

Code:
SYNCSORT FOR Z/OS    1.4.0.1R   XXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXX         z/OS 1.13.0


Regards,
Venu.
Back to top
View user's profile Send private message
Ronin.

New User


Joined: 28 Feb 2014
Posts: 4
Location: down in the sea

PostPosted: Mon Mar 10, 2014 4:46 am    Post subject: Reply to: Required help on SORT
Reply with quote

Brother,

Adding trailer on the "key field" and using COUNT and SUM option will solve the problem. But that will insert the trailer record once the key changes. So this solution may still need two steps. But I am sure wizards of mainframes present in the forum will have the solution in a step.

Ronin.
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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us