EQA1613E SAMEKEY( variable name ) must refer to a RECORD file.
Explanation
You must name a RECORD file in the SAMEKEY built-in function. This requirement is tested for all file constants, but is tested for file variables only if the file variable is associated with an open file.