Are you asking if you can select records in one file based on records in another file? Please explain more clearly what you want to do. Show an example of the input records in each file (relevant fields only) and the expected output records. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files.
Why do you assume that the only way to do it is to put the records in SYSIN? That's NOT the way to do it. You can use either the SELECT or SPLICE operator of DFSORT to do this kind of thing. How you would do it exactly depends on what your records in the two files look like, whether there are duplicates within each file, etc. There are numerous examples on this board of using SELECT and SPLICE to do this kind of thing.