Hello All
i've been trying to find a way that would allow a program i wrote (very large) to skip errors associated with fetching data. Because i'm writing a loop to fetch a large number of different series, a common problem i face is when a particular series doesn't exist.
i would like to code the program to skip errors and continue the fetching process
i've tried @isobject with no success (i think it works only for errors generated within a workfile)
many thanks in advance
Wes
Skip Errors when Fetching
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Skip Errors when Fetching
EViews 7 has a number of new tools for managing errors:
I suspect that clearerrs would work for you.
Code: Select all
clearerrs
@errorcount
seterrcount
seterr
setmaxerrsRe: Skip Errors when Fetching
thank you Gareth
i'll look these up and see what i come up with
cheers
Wes
i'll look these up and see what i come up with
cheers
Wes
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Skip Errors when Fetching
No problem!
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Skip Errors when Fetching
Hey, wait a minute :)
Re: Skip Errors when Fetching
Why don't you try something like:
%db="mydatabase::"
%ser_list="ser1 ser2 ser3"
%serfound=@wcross(%db,@wlookup(@wcross(%db,%ser_list)))
fetch {%serfound}
or something like that. The @wlookup will check whether the series exists in your database and return a string (without the mydatabase::).
Regards,
Javier
%db="mydatabase::"
%ser_list="ser1 ser2 ser3"
%serfound=@wcross(%db,@wlookup(@wcross(%db,%ser_list)))
fetch {%serfound}
or something like that. The @wlookup will check whether the series exists in your database and return a string (without the mydatabase::).
Regards,
Javier
Re: Skip Errors when Fetching
@Glenn ... sorry mate! Impuslive reaction i suppose ~ it's usually Gareth that I speak with
@Javier ~ thank you for the heads-up, I'll give it a try!
cheers all
Wes
@Javier ~ thank you for the heads-up, I'll give it a try!
cheers all
Wes
Who is online
Users browsing this forum: No registered users and 2 guests
