Hi
I have a file structure like this
M1C1ARECP
M1C1B______
M1C1C______
M1C1EXXXXX
M1C1ACORR
M1C1B______
M1C1C______
M1C1EXXXXX
M1C1P______
M1C1P______
M1C1ARVRS
M1C1B______
M1C1C______
M1C1EXXXXX
M1C1P______
the 5th byte here i.e. A,B,C E,P here indicate record types.
I want to sort this file based on 6th position to 4 bytes for A type record only, but I want record types to be in same order i.e. A should be first. The file can contain some vales in same position for other record types.
Op should be like this:
M1C1ACORR
M1C1B______
M1C1C______
M1C1EXXXXX
M1C1ARECP
M1C1B______
M1C1C______
M1C1EXXXXX
M1C1P______
M1C1P______
M1C1ARVRS
M1C1B______
M1C1C______
M1C1EXXXXX
M1C1P______
the issue I am facing is that I want A to P records in ascending order based on field of A type record only.
I have a bsic knowledge of Sort not very high level.
I cam eto know that by using these "IFTHEN=(WHEN=GROUP with PUSH" I can solve my issue. Any idea on how can we use this commands in Sort.
Or any other way as well can be really helpful
Please help me
Thanks and Regards
Vicky Punjabi