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: 7251

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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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