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
 

 

Sorting in group, cross referring bytes in different positio

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Sorting in group, cross referring bytes in different positio
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 Moderator


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

PostPosted: Fri Jul 11, 2008 8:59 pm    Post subject:
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    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 Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Efficient sorting chandracdac DFSORT/ICETOOL 5 Sat Oct 22, 2016 3:23 am
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Stripping and Sorting of VB file G SRINIVASA RAO SYNCSORT 5 Wed Sep 14, 2016 1:34 pm


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