Reading Text File data as dates

For questions regarding programming in the EViews programming language.

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

wolfesar
Posts: 1
Joined: Wed Dec 04, 2019 8:46 am

Reading Text File data as dates

Postby wolfesar » Wed Dec 04, 2019 12:49 pm

Hi,

I am importing data through a text file that is in a time series.

cd \\Msad\root\NA\NY\lib\ER\ER18\NonResi
%filename = "\\Msad\root\NA\NY\lib\ER\ER18\NonResi\CM\comb_file.txt"
wfopen(wf=constructionmonitor) %filename @freq m
pagestruct(create) areaname @date(month)

The dates being translated from the textfile into eviews are appear as "YYYYMM" (199003) as opposed to when we upload the data from excel, the program reads the data as "YYYY"m"MM" (1990m03). As a result, in the final step of the program when we try to combine all the data with the same date, the program does not register the dates and will not create the variables "value_sample2" and "permit_sample2" (see below).

Final step:
pagecreate(id, page=Raw_Data4) month
pagestruct(freq=m,start=1993, end=2019)
link value_sample2.linkto(c=sum) Raw_Data3::value_sample @date month
link permit_sample2.linkto(c=sum) Raw_Data3::permit_sample @date month
pageselect Raw_Data4

sample compile 2003:01 2019:11
pagecopy(smpl=compile, page="compiled_data")
pageselect compiled_data
delete compile

If you can advise how to add to the program to file this I would appreciate it.

Thank you.

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

Re: Reading Text File data as dates

Postby EViews Gareth » Wed Dec 04, 2019 1:42 pm

This is a somewhat confusing question. Nowhere do I see opening of an Excel file, or how that Excel file relates?

If you're doing a pagestruct immediately after the wfopen, you probably don't need the @freq part of the wfopen.

The use of the create option in pagestruct implies there is something wrong with the source date series?


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests