The join logical file can only be keyed on fields from the primary file. You can select/omit based on any fields included in the join.
I don’t believe that OPNQRYF has this restriction — this can be placed in an CL just before the call to your program (assuming that you are writing a program)
Or your program can access the files seperately without a join.
Or use a join and a read loop to find the record(s) with the required value in the field from the secondary file.