I'm using the forcase instruction to load a case into memory.
The dictionary has several record types, and one of them occurs 9 times.
When I try to access the totoc for this record, I get the following message:
ERROR: Ambiguous symbol 'Y_VISITAS' (2 synonyms found) - please provide qualifiers enough to avoid ambiguity near line 1578 in GLOBAL procedure
In my case Y_VISITAS is the record name, and I do not have any other symbol with such name.
The snipet for the function is
forcase FIPETUR_10_ENTREVISTA_DICT do
do i = 1 until i > totocc(Y_VISITAS)
.....
enddo;
endfor;
What am I doing wrong?
forcase produces ambiguous symbol
Re: forcase produces ambiguous symbol
This is an annoyance of CSPro. When you have a record in an external dictionary CSPro creates two symbols with the same name: one for the record and one for the group. You can workaround this by using the of the dictionary followed by a period then the name of the record. This tells CSPro to use the record name. In your case assuming Y_VISITAS is in dictionary FIPETUR_10_ENTREVISTA_DICT then you would use:
totocc(FIPETUR_10_ENTREVISTA_DICT.Y_VISITAS)
And if totocc gives unexpected results then try using count instead.Re: forcase produces ambiguous symbol
I´ve tried the complete name (with the dot) and the totocc returns 0 all the time.
Best
Ari
Ari
Re: forcase produces ambiguous symbol
But if I use the count function it returns the actual number of cases.
Best
Ari
Ari
Re: forcase produces ambiguous symbol
Yes, totocc is unreliable with external dictionaries. Stick with count.