Prev: Plese help: Urgent: compare columns in 2 tables based on value from third table
Next: Rounding/Merging
From: ha pook on 16 Apr 2010 14:40 Hi, I have a list of files as AA001.csv AA002.csv AA003..csv BB001.csv BB002.csv ..... I need to substitute the file names with macro variable in the infile statement. infile "C:\My Documents\data\&fname"; I find that the infile statement does not read the macro variable if it is the first character of the file name. How should I do this? In my case, I cannot change the filenames as there are thousands of them from AA to ZZ with running number following it.
From: Reeza on 16 Apr 2010 20:57
On Apr 16, 11:40 am, ha pook <hahn...(a)gmail.com> wrote: > Hi, > > I have a list of files as > > AA001.csv > AA002.csv > AA003..csv > BB001.csv > BB002.csv > .... > > I need to substitute the file names with macro variable in the infile > statement. > > infile "C:\My Documents\data\&fname"; > > I find that the infile statement does not read the macro variable if > it is the first character of the file name. How should I do this? > In my case, I cannot change the filenames as there are thousands of > them from AA to ZZ with running number following it. Try resolving the macro with &fname. (a period at the end) rather than just &fname I'm not sure what you mean by 'if it is the first character of the macro variable name' In addition, there's a lot of macro's around that read multiple file names and then process. |