Page 1 of 1

sorting with omit

PostPosted: Thu Dec 06, 2012 6:33 pm
by blackswan
Hi,

I have a PS file with records with LRECL=80:

ABCDE 98789
ABCDE 456789087
ABCDE 5647860
ABCDE 89568
ABCDE 1


The output PS will contain with LRECL=80:

98789
456789087
5647860
89568
1


How can I do this by sort utility?

regards
utpal

Re: sorting with omit

PostPosted: Thu Dec 06, 2012 6:36 pm
by blackswan
I tried with:

SORT FIELDS=COPY
OMIT=(1,5,CH,EQ,C'ABCDE')


But I am getting blank in 2nd file.

Re: sorting with omit

PostPosted: Thu Dec 06, 2012 6:45 pm
by BillyBoyo
OMIT or INCLUDE is how you "filter" records from the input file.

Try

  INREC BUILD=(6,75)


on the line following your COPY and drop the OMIT.

Re: sorting with omit

PostPosted: Fri Dec 07, 2012 1:14 pm
by blackswan
Thanks Billy :)