----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+
DATE OF RUN: 11-01-06
XXXXXXXX ZZZZZZZZZZZZ MESSAGE
------------ ------------------- ------------
DATA1 DATA2 MSG1
AAAAA BBBBBBBBBBBB PAGE 1
DATE OF RUN: 11-01-06
XXXXXXXX ZZZZZZZZZZZZ MESSAGE
------------ ------------------- ------------
DATA1 DATA2 MSG2
AAAAA BBBBBBBBBBBB PAGE 2
DATE OF RUN: 11-01-06
XXXXXXXX ZZZZZZZZZZZZ MESSAGE
------------ ------------------- ------------
DATA1 DATA2 MSG1
AAAAA BBBBBBBBBBBB PAGE 3
DATE OF RUN: 11-01-06
XXXXXXXX ZZZZZZZZZZZZ MESSAGE
------------ ------------------- ------------
DATA1 DATA2 MSG3
AAAAA BBBBBBBBBBBB PAGE 4
But I want to get the output file with only the different MSGs only. So I have to use SORT on 50th column onwards like below -
Code:
//SYSIN DD *
SORT FIELDS=(53,44,CH,A)
INCLUDE COND=(50,21,CH,NE,C'DATE OF RUN: 11-01-06',
53,7,CH,NE,C'MESSAGE',
50,12,CH,NE,C'------------',
65,4,CH,NE,C'PAGE',
)
OUTREC FIELDS=(1:50,44)
SUM FIELDS=NONE
/*
But still I am not being able to remove the headers and all other fields. All the fields are coming aling with the unique MSGs list. Can you help me out to remove the extraneous fields like - DATE OF RUN, PAGE, ------------- and MESSAGE. I just want the output file looks like the following -
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
hi Amit,
Code Exclude condition in your sort control as follows.
SOrt on MSG
SORT FIELDS=(63,......)
OMIT COND=(70,11,CH,EQ,C'Date of run',<- TO IDENTIFY THE DATE LINE
62,7,CH,EQ'MESSAGE'', <-TO IDENTIFY THE MESAGE LINE
59,12,CH,EQ'------------', <- IDENTIFU --------
1,10,CH,EQ' ') <- IDENTIFY THE BLANK LINE
Please recheck the column number in the condition.