I use Eviews 10 March 2018 build. At least in this version, the command @wread seems to be buggy:
1) @wread encloses lines in quotes which is not wanted, and it does so inconsistently. See example below: lines read from text1.txt are enclosed in double quotes, not so lines read from text2.txt. The double quotes cannot be easily removed by @replace, for instance, because this would also remove those double quotes which have been inserted on purpose in the text file to be read in.
2) @wread seems to skip lines with one single character at the beginning of a row. See text2.txt in the example below
Also, it seems that @wread has not been documented in the off-line help of Eviews.
Code: Select all
' @wread encloses lines in quotes which is not wanted
if @isobject("txt1") then
' Generate a text file with some typical SQL code
txt1.append Select VAR1 VAR2
txt1.append from MYDB
txt1.append where VAR1 IN (X)
string str1 =@wread("text1.txt")
' @wread is buggy: it skips sinlge characters at the beginning of a line!
if @isobject("txt2") then
string str2 =@wread("text2.txt")