title: SAS - Need to make the filepath used in an INFILE statement dynamic
body: <p>I have a SAS procedures that runs every morning and it takes in a raw data file for the day called "Filename_20141117.txt". The last part of the file name is changing everyday to the date for that day.</p>
  
  <p>I want to make the INFILE statement in my SAS script smarter so that it knows to get the current day's file. I was trying to do a date concatenation, something like this:</p>
  
  <p>infile cat('G:\Finance\RawData\Filename_',year(today()),month(today()),day(today()),'.txt')</p>
  
  <p>Also, is there a way to declare variables and work with them in SAS, and not have them created as a table in your output? I'm a C/C#/VB programmer learning to program in SAS.
  I was thinking that i could make 3 string variables - day, month, and year.  Populate each variable with the corresponding value using the Day(), Month() and Year() function, with Today() as the date input. Then i was going to take these 3 variables and concatenate them to get my '20141118' that would be located at the end of the .txt file.</p>
  
  <p>However it doesn't like me doing this.  If anyone knows how to do this that would be fantastic. I'm very new to SAS Programming and its concepts.</p>
  
  <p>Thanks in advance.</p>