Hello - I'm brand new to SAS and am struggling with something. I have SQL code stored in a .txt file. I would like to read the .txt file contents into a single string variable in SAS that can then be called in a PROC SQL statement in order to run a query. The .txt file does have a few parameters/variables inside it that I will need to replace once imported into SAS, but I'm able to do that successfully. Below is a sample of the code I'm currently using. This process is able to get the .txt file contents, but it concatenates the lines in a way that makes the query error out due to formatting issues. Any point in the right direction is greatly appreciated. FILENAME msghtml "//mypath/myfile.txt"
data _null_;
length text $32767;
retain text '';
infile msghtml flowover dlmstr='//' end=last;
input;
text = catx(text,_infile);
run;
... View more