Ya it worked.
Don't need to put comma. Correct code is mentioned below.
Now one more thing i need to do.
There is one other file which has the layout mentioned below.
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).
The second file has the data
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.
In this NMBR is 005.
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??