IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort group of records


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

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

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

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

Superior Member


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

PostPosted: Mon Feb 02, 2009 2:04 pm
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 Developer


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

PostPosted: Mon Feb 02, 2009 10:19 pm
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
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

Superior Member


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

PostPosted: Wed Feb 11, 2009 5:57 pm
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

Moderator Emeritus


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

PostPosted: Wed Feb 11, 2009 9:33 pm
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 Developer


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

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

byearun,

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

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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top