Problem: read several .csvs with fixed series

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

SC Peng
Posts: 3
Joined: Fri Nov 16, 2012 8:00 am

Problem: read several .csvs with fixed series

Postby SC Peng » Fri Nov 16, 2012 9:21 am

Dear all:

I am the beginner of Eviews 7.2 so please forgive my ignorance.

My problem:
I have two .csv files, a.csv and b.csv. The "a.csv" is a "0 kb" file.
Eviews always show the window message "....the ser0!t is not defined..... " while I run the below program.

I think the reason is the a.csv file is empty(o kb), so I cann't use the command "skiprow", right? Cause I drop the command " skiprow=3 ", the window message would disappear. But I have to handle these files at the same time.....So what can I do to satisfy this empty file ?

My program:
for %B a b
wfcreate tt u 3000
read(t=dat,d=c,skiprow=3) C:\Raw\{%B}.csv 5
!y= 0
scalar ff_{%B}= 1
for !t=1 to 5
if @sum(ser0!t)<>NA then
!y=@sum(ser0!t)+!y
endif
next
stop

Thank you very much.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Problem: read several .csvs with fixed series

Postby EViews Gareth » Fri Nov 16, 2012 9:26 am

If you're using EViews 7.2, there is no reason to use the READ command. Use IMPORT or WFOPEN instead.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests