Error: A 2020 probably from find() function!

Discussions about CSEntry
Post Reply
rommydng
Posts: 1
Joined: January 25th, 2014, 5:37 am

Error: A 2020 probably from find() function!

Post by rommydng »

Hello everybody,

I am working with CSPro and some months ago I switched to 5.0.3.
I am facing this problem: Any time that the value entered trigger the call of the find (dict, =, etc) function,
I can enter the case, no errors until the end , and when the case is about to be saved I get this error:
A 2020 Data file for input dictionary is NULL.

I cannot find an explanation.I just know that it happens only if that function is called.
For reference: the function returns a correct value.
The dictionary used in the find function is the main dictionary , the one that defines the cases itself.

I would really appreciate any help !

P.S. It happens only when packed app enc. are used!
khurshid.arshad
Posts: 618
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Error: A 2020 probably from find() function!

Post by khurshid.arshad »

Dear rommydng;

I can see it if you can share with me. My email address is khurshid.arshad@gmail.com
a.
Gregory Martin
Posts: 1947
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Error: A 2020 probably from find() function!

Post by Gregory Martin »

rommydng,

Can you test this out using the new beta version of CSPro: http://www.csprousers.org/beta/

When I use CSEntry 5.0 with an .enc file with the find function, I get the problem, but using CSPro 6.0 with a .pen file doesn't give me an error. I seem to recall fixing something related to this a while back.
pierre

Re: Error: A 2020 probably from find() function!

Post by pierre »

Hey Greg,
Getting the same problem. If I use the locate then retrieve function it always returns the last index in the reference file. Maybe my code is bad.

check it out

Code: Select all

PROC ED_COICOP
clear(ALT_DICT);
clear(DIARY_DICT);
ok = loadcase(DIARY_DICT,C_DIST,C_EA,C_DWEL,C_HNUM);
if ok then
	ok = 0;
	for i in DIARY_DICT.DIARY_REC do 
		if strip(ED_DESC) = strip(TD_DESC(i)) then
			impute(ED_SEC_NUM, TD_SEC_NUM);
			impute(ED_COICOP,TD_COICOP(i));
			impute(ED_EXP_TYP1, TD_EXP_TYP1(i));
			impute(ED_EXP_TYP2, TD_EXP_TYP2(i));
			impute(ED_INC_TYP1, TD_INC_TYP1(i));
			impute(ED_INC_TYP2, TD_INC_TYP2(i));
			errmsg("%s cur:%D, new:%d",strip(ED_DESC), ED_COICOP, TD_COICOP(i));
			ok = 1;
			break;
		endif;
	enddo;
	if not ok then
		errmsg("No Match - %s",ED_DESC);
		impute(ED_DELETE,9);
		ok = locate(ALT_DICT, <= , strip(ED_DESC));
		if ok then
			ok = retrieve(ALT_DICT);
			if ok then
				errmsg("%s",key(ALT_DICT));
				errmsg("new: %d - %S",ALT_COICOP, strip(ED_DESC));
				impute(ED_COICOP, ALT_COICOP);
			endif;
		endif;
	endif;
endif;


Gregory Martin
Posts: 1947
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Error: A 2020 probably from find() function!

Post by Gregory Martin »

Pierre,

I can't immediately see anything wrong in your code, though that doesn't mean that there isn't a problem. Can you send me your application (csprousers@gmail.com)? ALT_DICT, I assume, is an external dictionary?
Post Reply