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

Sorting in group, cross referring bytes in different positio


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vpr_118
Warnings : 1

New User


Joined: 07 Apr 2008
Posts: 64
Location: chennai

PostPosted: Fri Jul 11, 2008 6:02 pm
Reply with quote

Hi,

I have a file, please find the format below;

aaaaaaaaaa bbbbbbbbbb 00000
9999999999 0000000000
bbbbbbbbbb cccccccccc
cccccccccc dddddddddd
7777777777 9999999999
dddddddddd pppppppppp
2222222222 7777777777
xxxxxxxxxxx 2222222222 00000

Now, my output file must be in the below order

aaaaaaaaaa bbbbbbbbbb 00000
bbbbbbbbbb cccccccccc
cccccccccc dddddddddd
dddddddddd pppppppppp
xxxxxxxxxxx 2222222222 00000
2222222222 7777777777
7777777777 9999999999
9999999999 0000000000


Note: the 1st ten bytes of the record which has 00000 will never be present in next ten bytes of any of the records.

records given in output -> 1 till 4 are related, and 5th till 8th are related.

From the above output file: let us assume,
xxxxxxxxxxx is less than aaaaaaaaaa (see the 1st ten bytes, these two are not present in the 2nd ten bytes in any of the records)

Now when i sort the output file in Ascending order..
The output must be like below:

xxxxxxxxxxx 2222222222 00000
2222222222 7777777777
7777777777 9999999999
9999999999 0000000000

aaaaaaaaaa bbbbbbbbbb 00000
bbbbbbbbbb cccccccccc
cccccccccc dddddddddd
dddddddddd pppppppppp


The related records must be grouped as it is.

Can it be done using sort alone.
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: Fri Jul 11, 2008 8:59 pm
Reply with quote

Maybe, if somebody could figure out your "rules".

Quote:
records given in output -> 1 till 4 are related, and 5th till 8th are related.


Related in what way? What are the "rules" that give the relationship?

Quote:
let us assume, xxxxxxxxxxx is less than aaaaaaaaaa


What do you mean by this? Last time I looked, 'x' was greater than 'a'.

Quote:
when i sort the output file in Ascending order..


Sort in ascending order by which field?

You're going have to do a better job of explaining what you want to do and the "rules" for doing it.

You should also give the RECFM and LRECL of the input file, and the starting position, length and format of all relevant fields. Maybe an example with more records would help as well.
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
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
No new posts Compare latest 2 rows of a table usin... DB2 1
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
No new posts Problem with IFTHEN=(WHEN=GROUP,BEGIN... DFSORT/ICETOOL 5
No new posts Splitting group records based on deta... DFSORT/ICETOOL 8
Search our Forums:

Back to Top