Hi - Using eviews 9 enterprise
I have a dataset where the major identifier (variable) is a string called "projectnum" with a "-" stuck in the middle. Like this:
21838-0004
21838-0007
02101-0005
03901-0001 etc
I'm using a FOR loop AND a WILDCARD to pull each record associated with a specified projectnum - there are over 900 projects (I'm just showing the first string)
It crashes when I get to line 3 of the code listed below with the error message - illegal date 21838 in "SMPL 21838"
Suggestions? Thanks
smpl @all
for %1 ""21838*""
smpl @all if projectnum={%1}
totalbid.statby(nomean, sum, nostd, nocount) test2 worktype
smpl @all
next
stop
for loop using strings and widcards
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: for loop using strings and widcards
You can't use a wildcard inside a smpl statement.
Use a string function such as @instr or @left.
Use a string function such as @instr or @left.
Who is online
Users browsing this forum: No registered users and 2 guests
