Page 1 of 1

DFSORT help in Variable Block File with diff rec types

PostPosted: Wed Jan 08, 2014 9:57 am
by vickypunjabi4
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

Re: DFSORT help in Variable Block File with diff rec types

PostPosted: Wed Jan 08, 2014 2:31 pm
by NicC
Vicky - posting across different forums is bad manners. Your query is being dealt with elsewhere. I am locking this.