sorting records

Benjamin Wagner

New Member
I'm trying to sort by the following fields, using break by, but need to keep two other fields from being broke up.
order-no and line-no based on another field unty. Any help with this would be appreciated, fairly new with progress and my only resource is the internet.

FOR EACH t-Data EXCLUSIVE-LOCK
BREAK BY t-data.sort1
BY t-data.widh
BY t-data.insh
BY t-data.iswd
BY t-data.isht:
 
Show some sample data and example results. Then explain what you would like to see different.
I attached the document that has the records that are being sorted. Highlighted yellow relates to the fields in the first post that are currently in the break by. Highlighted green are the order-no and line-no that I need to stay together, If you scroll down in the document you will see more then one record with the same order-no line-no also highlighted green. I keep thinking if I could create a set with the same order-no and line-no then sort those sets based off the fields I'm sorting by now for just one item of the set, it would work, but I cant seem to figure out how to do that or if that is the answer.
 

Attachments

I don't understand the problem.

Are you saying that you need to *also* group by order# & line#? If so then why not simply add them to your BY clauses?
 
Back
Top