Question
· Oct 4, 2017

Error when sorting a dictionary section of a file

I setup an account in Cache and when I try to sort the dictionary item in the file by using the command SORT DICT filename, where filename is the name of the file i.e. SORT DICT TEST, I get the following error  CMQL: The DICT entry "FIELD.ASSOC_" is not defined

The LISTDICT works correctly. Any thoughts on how to correct this error?

Discussion (2)0
Log in or sign up to continue

When you sort the DICT of a file, the file DICT.DICT is used as the dictionary, so it sounds like you have a malformed item in DICT.DICT.

Use the SEARCH command to look for FIELD.ASSOC in DICT.DICT. For example on my instance:

USER:SEARCH DICT.DICT *
STRING:ASSOC
STRING:

1  Items selected to list #0
USER>>CT DICT.DICT

     @
0001 PH
0002 @ID FMT "17L" CODE KEY.CODE CONV FORMAT NAME FMT "7L" SM ASSOC ID.SUP BY NAME
0003

so in my DICT.DICT I don't have anything with FIELD.ASSOC_ in it, but the "@" item--which is used for a default list when no attributes are referenced--has a similar name "ASSOC". Maybe your "@" entry was overwritten by one from an imported account? Also use search to look at DICT TEST because even though it isn't used by the default list, CMQL might be parsing it. If you don't find anything in DICT.DICT or DICT TEST, try looking in VOC and DICT VOC as well.

You hit on the issue. I have this in the DICT.DICT

@

0001: PH
0002: BY FIELD.NO BY TYPE ID.SUP FIELD FIELD.TYPE FIELD.DEF FIELD.CONV FIELD.HEAD FIELD.FMT FIELD.ASSOC_
0003: HEADING "'F'    'T'  Page 'PL'"

I'm not sure if the '_' is supposed to be a continuation and something else is missing. There is a FIELD.ASSOC item in the DICT.DICT. I tried removing the '_' and left FIELD.ASSOC and it got some type of new error, so.... I just removed the FIELD.ASSOC item completely and I'm able to sort and list dictionarys correctly now.