Page 1 of 1

Linkto with unstructured/undated pages, smpl option

Posted: Tue Nov 11, 2014 6:06 am
by ErikG
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.

Re: Linkto with unstructured/undated pages, smpl option

Posted: Tue Nov 11, 2014 8:45 am
by EViews Gareth
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.

Re: Linkto with unstructured/undated pages, smpl option

Posted: Wed Nov 12, 2014 1:13 am
by ErikG
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