it would be better for You to learn to use the proper terminology ...
... i need to get the output as whether the given names in PS1 is present in PS2 or not.
Your requirement seems NOT compare two files
but to find out if some string is present in a file,
for that the proper way is to use the otter ISPF tool SRCHFOR
see the ISPF help on how to use it