Opening a data file within a dofor loop
Posted: Mon Sep 22, 2008 5:27 pm
Hello,
I am trying to open a data file within a dofor loop. When I run the code outside of a loop, it works fine, but when it is inside the loop, upon my first attempt to use one of the variables from the file, i get the syntax error message "##SX11 Identifier is not recognizable"
--------------------------------------------
declare string str
dofor str = "aaa" "bbb" "ccc"
open data "C:\myfile.xls"
data(format=xls,org=columns)
close
print 1 5 var1
## SX11. Identifier var1 is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>print 1 5 var1<<<<
end dofor str_mo
## SX21. A END or } Here is Unneeded or Unexpected
--------------------------------------------------------------------
Thanks in advance,
-CP
I am trying to open a data file within a dofor loop. When I run the code outside of a loop, it works fine, but when it is inside the loop, upon my first attempt to use one of the variables from the file, i get the syntax error message "##SX11 Identifier is not recognizable"
--------------------------------------------
declare string str
dofor str = "aaa" "bbb" "ccc"
open data "C:\myfile.xls"
data(format=xls,org=columns)
close
print 1 5 var1
## SX11. Identifier var1 is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>print 1 5 var1<<<<
end dofor str_mo
## SX21. A END or } Here is Unneeded or Unexpected
--------------------------------------------------------------------
Thanks in advance,
-CP