Page 1 of 1

Skip Errors when Fetching

Posted: Wed Dec 15, 2010 1:27 pm
by w_nawfal
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

Re: Skip Errors when Fetching

Posted: Wed Dec 15, 2010 2:07 pm
by EViews Glenn
EViews 7 has a number of new tools for managing errors:

Code: Select all

clearerrs @errorcount seterrcount seterr setmaxerrs
I suspect that clearerrs would work for you.

Re: Skip Errors when Fetching

Posted: Wed Dec 15, 2010 2:11 pm
by w_nawfal
thank you Gareth

i'll look these up and see what i come up with

cheers

Wes

Skip Errors when Fetching

Posted: Wed Dec 15, 2010 2:35 pm
by EViews Gareth
No problem!

Re: Skip Errors when Fetching

Posted: Wed Dec 15, 2010 5:52 pm
by EViews Glenn
Hey, wait a minute :)

Re: Skip Errors when Fetching

Posted: Thu Dec 16, 2010 3:34 pm
by javiersan
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

Re: Skip Errors when Fetching

Posted: Mon Dec 20, 2010 1:39 pm
by w_nawfal
@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