Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ordering of file thta has been partitioned.

Status
Not open for further replies.

jinkys

Programmer
Sep 11, 2003
67
GB
I have an issue that I need to reorder a file to the same format as the input, the problem being that the order is sorted from either the partitioning or the use of an unodered group. I have a fixed format input file as follows

H1(1:1)
D1111(s)
D2111(s)
D3111(s)
D2111(s)
D4111(s)
D5111(s)
D1222(s)
D2222(s)
D3222(s)
D4222(s)
D5222(s)
T1(1:1)

The file first field is the record type ("D2" for example) and the second field is the record key ("111") H1 and T1 are the header and trailer. I have included the range value in brackets on each.

My type tree partitions the records using the initiator H1, D1 etc and within that uses an unordered group for each record of D1,D2 D3, D4 and D5.

The issue is that the output produced from this is as follows

H1
D1111
D1222
D2111
D2111
D2222
D3111
D3222
D4111
D4222
D5111
D5222
T1

I need the output to be in the order of the input, anyone know how I can do this?

Thanks in advance to any suggestions
 
Have you tried creating a type tree like this:

H1(1:1)
record(s)
T1(1:1)

where record is choice or partitioned group of D1, D2, D3 etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top