Skip Errors when Fetching

For questions regarding programming in the EViews programming language.

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

w_nawfal
Posts: 69
Joined: Fri Jul 30, 2010 6:58 am
Location: Montreal, Canada
Contact:

Skip Errors when Fetching

Postby w_nawfal » Wed Dec 15, 2010 1:27 pm

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

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Skip Errors when Fetching

Postby EViews Glenn » Wed Dec 15, 2010 2:07 pm

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.

w_nawfal
Posts: 69
Joined: Fri Jul 30, 2010 6:58 am
Location: Montreal, Canada
Contact:

Re: Skip Errors when Fetching

Postby w_nawfal » Wed Dec 15, 2010 2:11 pm

thank you Gareth

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

Postby EViews Gareth » Wed Dec 15, 2010 2:35 pm

No problem!

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Skip Errors when Fetching

Postby EViews Glenn » Wed Dec 15, 2010 5:52 pm

Hey, wait a minute :)

javiersan
Posts: 184
Joined: Mon Jan 19, 2009 8:18 am

Re: Skip Errors when Fetching

Postby javiersan » Thu Dec 16, 2010 3:34 pm

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

w_nawfal
Posts: 69
Joined: Fri Jul 30, 2010 6:58 am
Location: Montreal, Canada
Contact:

Re: Skip Errors when Fetching

Postby w_nawfal » Mon Dec 20, 2010 1:39 pm

@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


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests