Unable to wait any longer, I submitted a trouble report and got my answer. For the benefit of others who may encounter the same problem, here is the solution:
[Quote]
According to my tests using JMP 8.0, the Open command will accept a variable. My impression is that the problem you are encountering is actually caused by the current directory being something other than C:\Test. When using the method you demonstrated, the current directory must be the same as the location of the file you are trying to open. If not, then the file may not be found.
Any easy way to handle this is to concatenate the path with the file name as in the following example:
Open( "C:\" || files[ i ] );
Alternately, you can set the current directory via JSL using the Set Current Directory command:
Set Current Directory( "C:\" );
After setting the current directory, you should be able to use the Open command with only the variable:
Open( files[ i ] );
[End Quote - Thanks Wendy Murphrey]
I used the second option.Now that I've learned how to post code, this is what I am trying to do:
files = Files In Directory("c:\Test");
for(i=1, i<= N Items(files), i++,
Open(files[ i ],
columns(
DEV_ID = Character,
. = Omit,
TEST = Character,
VEE = Numeric,
IEE = Numeric,
. = Omit,
. = Omit,
. = Omit,
IDLNA = Numeric,
. = Omit,
. = Omit,
TEMP = Character,
FREQ = Numeric,
. = Omit,
. = Omit,
DB21 = Numeric,
. = Omit
),
Import Settings(
End Of Line( CRLF, CR, LF ),
End Of Field( Comma ),
Strip Quotes( 1 ),
Use Apostrophe as Quotation Mark( 0 ),
Scan Whole File( 1 ),
Labels( 1 ),
Column Names Start( 15 ),
Data Starts( 16 ),
Lines To Read( All ),
Year Rule( "10-90" )
);
)
)