So I notice that for csv files there are double quotes and for .txt single quotes around the path of the file in the infile statement. Why is this the case?
@edasdfasdfasdfa wrote:
So I notice that for csv files there are double quotes and for .txt single quotes around the path of the file in the infile statement. Why is this the case?
I suppose it is the whim of the programmer who did this. There's really no such rule.
Either single quotes or double quotes ought to work fine, except in the case where the path of the file contains a macro call or a macro variable, in which case double quotes are required.
Hello @edasdfasdfasdfa
Should your path contain a macro variable reference that may contain the name of the file name or something like that, you would need to enclose the path in double quotes for the reason macro variable references do not resolves within single quotes in a literal. Macro variables references do resolve within double quotes in a literal.
@edasdfasdfasdfa wrote:
So I notice that for csv files there are double quotes and for .txt single quotes around the path of the file in the infile statement. Why is this the case?
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.
Explore Now →SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.