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

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 SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm


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