still Your explanation of the requirement is clear as mud!
the logical problem is to find out the common symbols/token/words/calltheminanywayYouwant in two lists .
ls1 = "EMP_NUM EMP_NAME EMP_DEPT EMP_SALARY ONLY_IN_LIST1"
ls2 = "EMP_NUM EMP_DEPT EMP_SALARY ONLY_IN_LIST2"
/* brute force
do i = 1 to words(ls1)
do j = 1 to words(ls2)
if word(ls1, i) = word(ls2, j) then ,
say "==>" word(ls1, i) "=" word(ls1, i)
==> EMP_NUM = EMP_NUM
==> EMP_DEPT = EMP_DEPT
==> EMP_SALARY = EMP_SALARY
frankly it is pretty sad that a tool developer could not come up with a solution
to such a simple matching problem
a more sophisticated solution would have been to sort the two list
and do a two sequences match
but the overhead of sorting would have been probably been higher