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
 

 

Sort group of records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
aakar

New User


Joined: 08 Apr 2008
Posts: 36
Location: mumbai

PostPosted: Sat Jan 31, 2009 6:55 am    Post subject: Sort group of records
Reply with quote

I have a requirement wherein i have a variable block file, which has first three bytes indicating record type. The record type HED has a field at 20th poistion.Each HED is associated with few other types of records like ABC, DEF etc.These other records do not have this key.

HED.........data.........002(key)............
ABC.........data.........
DEF.........data.........
HED.........data.........001............
ABC.........data.........
DEF.........data.........
HED.........data.........003............
ABC.........data.........
DEF.........data.........
HED.........data.........001............
ABC.........data.........
DEF.........data.........

Desired output sorted on the key in HED :
HED.........data.........001............
ABC.........data.........
DEF.........data.........
HED.........data.........001............
ABC.........data.........
DEF.........data.........
HED.........data.........002............
ABC.........data.........
DEF.........data.........
HED.........data.........003............
ABC.........data.........
DEF.........data.........

Is anything possible with SORT/DFSORT??
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Jan 31, 2009 9:28 pm    Post subject:
Reply with quote

You can do this using the method shown in the "Sort groups of records" Smart DFSORT Trick at:

http://www.ibm.com/systems/support/storage/software/sort/mvs/tricks/

If you need more help with this, tell me the RECFM and LRECL of your input file and the length and format of the key.
Back to top
View user's profile Send private message
aakar

New User


Joined: 08 Apr 2008
Posts: 36
Location: mumbai

PostPosted: Mon Feb 02, 2009 10:37 am    Post subject:
Reply with quote

Thanks frank for the reply, but we are restricted from using ICEMAN, and so can we do it through simple "Sort"
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Mon Feb 02, 2009 11:00 am    Post subject:
Reply with quote

If your shop has DFSORT, SORT=ICEMAN. If your shop has Syncsort, SORT=SYNCSORT.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Feb 02, 2009 2:04 pm    Post subject:
Reply with quote

Hello,

ICEMAN would invoke the SORT product installed at your site - in your JCL use PGM=SORT in place of PGM=ICEMAN, job should go fine. By the way who makes these stupid restrictions,
Quote:
but we are restricted from using ICEMAN
whoever they are they just don't know what they are talking about and are in wrong profession for sure.. icon_evil.gif
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Feb 02, 2009 10:19 pm    Post subject:
Reply with quote

Quote:
Thanks frank for the reply, but we are restricted from using ICEMAN, and so can we do it through simple "Sort"


Not sure what you mean by this. PGM=ICEMAN or PGM=SORT invokes DFSORT. So what do you mean by "we are restricted from using ICEMAN"? And what do you mean by "simple "Sort"'? Since you posted in the DFSORT Forum, I assume you're using DFSORT and I gave you a DFSORT solution. You could use PGM=SORT instead of PGM=ICEMAN but both will give you the exact same result.
Back to top
View user's profile Send private message
byearun

New User


Joined: 25 Jul 2005
Posts: 17

PostPosted: Wed Feb 11, 2009 5:45 pm    Post subject:
Reply with quote

Hi, When I used WHEN=GROUP, it is failing with syntax error. if i remove those conditions, it is working, but i didn't get the expected result. can someone help on this??
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Feb 11, 2009 5:57 pm    Post subject: Reply to: Sort group of records
Reply with quote

Hi,

1. Are you a DFSORT user or a SyncSort?
2. If SyncSort, question is out of scope.
3. If DFSORT, you need to have PTF UK90013 for z/OS DFSORT V1R5 (July, 2008) which provides important enhancements to DFSORT and DFSORT's ICETOOL to use group operations (WHEN=GROUP) among others.

You give us nothing to work on, something is "not working" does not convey anything - you should have posted the complete diagnostic information & what do you expect in output, what input is used with thier LRECL/RECFM, positions of "keys" and rules.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Feb 11, 2009 9:33 pm    Post subject:
Reply with quote

Hello,

Quote:
it is failing with syntax error.
There is some reason you did not post the sytax error including the message id?

Telling us "it didn't work" will get no really useful replies - just requests for the info that is needed to help you.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Feb 11, 2009 11:10 pm    Post subject:
Reply with quote

byearun,

If you are using DFSORT, see the following for information on how to determine your level:

http://ibmmainframes.com/viewtopic.php?t=33389

If you don't have PTF UK90013, ask your System Programmer to install it (it's free).
Back to top
View user's profile Send private message
byearun

New User


Joined: 25 Jul 2005
Posts: 17

PostPosted: Thu Feb 12, 2009 1:34 pm    Post subject:
Reply with quote

It seems the above mentioned package was not installed in our system. We have asked to install the same. Anyways thanks to Anuj, Dick and Frank.
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 -> DFSORT/ICETOOL 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