Ya it worked.
Thanks Billy.
Don't need to put comma. Correct code is mentioned below.
OPTION EQUALS
MERGE FIELDS=(1,2,ZD,A)
DUPKEYS MAX=(06,03,ZD)MIN=(03,03,ZD)
Now one more thing i need to do.
There is one other file which has the layout mentioned below.
01 FILE-REC
05 LIC-NMBR PIC 9(2)
05 nmbr PIC 9(03)
The file which we created from the above mentioned merge step has three things LIC-NMBR, MIN-NMBR and MAX-NMBR.
These two files has to be compared.
From the Merge step we got the output(mentioned below).
File-1
11001005
12000007
13000001
The second file has the data
File-2
11003
11002
11004
12001
12002
13001
it could be in ascending or descending order.
We have to compare these two files on the basis of Field NMBR, this field should be in between MIN-NMBR & MAX-NMBR of file 1 for the particular LIC.If it doennot belong to then it has to be written in output file.
For example
11001005
In this NMBR is 005.
In file-2
11003
11002
11004
For the LIC (11) Min-NMBR is 001 and MAX-NMBR IS 005. So above given number (003,002,004) are in between 001 & 005.They will not be written to the file. But if there would have been one more record like 11007 then it has to be written to the error file as 11007007.
How could it be achieved??