Linkto with unstructured/undated pages, smpl option

For questions regarding programming in the EViews programming language.

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

ErikG
Posts: 85
Joined: Wed Jan 23, 2013 1:18 am

Linkto with unstructured/undated pages, smpl option

Postby ErikG » Tue Nov 11, 2014 6:06 am

Hi,

The smpl option in the linkto command does not seem to work for unstructured pages. In the following example, I get an error in the link object:
*** Unable to Perform Link ***
Error in Sample: Illegal date IF AMONTH="SEPTEMBER".

Code: Select all

WfCreate(wf=C:\Temp\test.wf1) u 10 Alpha aStudentName = "Brian" aStudentName(2) = "Anne" aStudentName(3) = "Anne" Alpha aMonth = "january" aMonth(3) = "september" aMonth(4) = "september" Series TestScore = 3 PageRename untitled RawData PageCreate(page=ScoreInSeptember) u 10 Alpha aName = "Anne" Link Score Score.linkto(c=unique,Smpl="if aMonth="september"") RawData\TestScore @src aStudentName @dest aName
This is a simplification of an actual calculation I am trying undertake.

Regards,
/Erik.

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

Re: Linkto with unstructured/undated pages, smpl option

Postby EViews Gareth » Tue Nov 11, 2014 8:45 am

You need this:

Code: Select all

Score.linkto(c=unique,Smpl="if aMonth=""september""") RawData\TestScore @src aStudentName @dest aName
But, there's a bug in EViews right now where we're uppercasing the smpl string, so the "september" is converted to "SEPTEMBER", which means there are no matches.

ErikG
Posts: 85
Joined: Wed Jan 23, 2013 1:18 am

Re: Linkto with unstructured/undated pages, smpl option

Postby ErikG » Wed Nov 12, 2014 1:13 am

Thanks, it works. This seems to solve the uppercase issue:

Code: Select all

Score.linkto(c=unique, Smpl="If @UPPER(aMonth)=""september""") RawData\TestScore @src aStudentName @dest aName


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests