Your intent is to run the PROC SQL against a SAS dataset, right? If so, isn't the answer to your question in the INFO note from your log fragment (italicized and bolded below)?
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR 24 proc sql; 25 select * from XXX where id='XXX' and date=XXX; INFO: Data file XXX.DATA is in a format that is native to another host, or the file encoding does not match the session encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce performance. 26 quit; NOTE: PROCEDURE SQL used (Total process time): real time 2:36.57 cpu time 2:15.14
27
The note is telling you that dataset XXX may be a sas dataset, but in a format that is native to another host, (or the file encoding does not match encoding in your SAS session). We get that for instance when a sas dataset created in a unix environment is downloaded unchanged and then accessed using Windows SAS. Make a native copy of SAS dataset XXX and rerun the PROC SQL.
... View more