|
On Apr 12, 7:55 am, priyanka.priyankasi...@GMAIL.COM (Priyanka Singh)
wrote:
> Dear all,
>
> I am trying to import multiple from a folder. However, I have folders inside
> that folder. So first I want to read the contents of main folder and using
> the name of the folders inside it , enter into each folder and read the
> files. This is where I have my real files. But the following code does not
> seem to work :
The problem is at
filename indat pipe 'dir J:\1999\199901\Snapshot\1999\Jan\&&pext&j /
b';
Macro variables do not resolve when used inside single-quoted
literals.
Use double quotes instead. Macro variables will be resolved when
inside a double quoted string.
Additionally, you might save yourself some headaches by
- using DIR /S to let the operating system recurse for you.
- using CAT, CATT, CATS, or CATX function when building a string from
lots of pieces, some of which are numeric variables.
call symput('fname1'||trim(left(put(j,8.))),scan(trim(fname1),
1,'.'));
would become
call symput(cats('fname1',j),scan(trim(fname1),1,'.'));
--
Richard A. DeVenezia
http://www.devenezia.com
|