Dear prabhustat,
I know you asked Josh to help you facing your error, but maybe I can help.
That error is because you need to list all the ID variables that identifies the case of your external dictionary.
Here is a more explicit:
Writecase Function
Format:
b = writecase(ext-dict-name[,var-list]);
Description:
The writecase function writes a case from memory to an external data file. It can be used to update existing cases or to write new ones.
The ext-dict-name must be supplied. It is the internal name of the dictionary defined in the application for the external file.
The optional var-list defines the case identifiers in the external file.
The writecase function concatenates the variables specified in var-list to form a string whose length must be the same as the length of the case identifier in the external dictionary. All variables in the var-list must exist in a dictionary or working storage. If no var-list is provided, the current values of the identifiers in memory for the external file are used.
So in your LFSTATE_CODE procedure you can try the following:
Code: Select all
PROC LFSTATE_CODE
LFSTATE_CODE1 = LFSTATE_CODE;
LFDISTRICTS_CODE1 = LFDISTRICTS_CODE;
MONTIL1 = MONTIL;
DATE_YEARL1 = DATE_YEARL;
MDR_CASE_UNIQUEL1 = MDR_CASE_UNIQUEL;
SESSION1 = SESSION;
if not loadcase(MDR_EXT_DICT,LFSTATE_CODE1) then
enter MDR_Ext_FF;
writecase(MDR_EXT_DICT,LFSTATE_CODE1,LFDISTRICTS_CODE1,MONTIL1,DATE_YEARL1,MDR_CASE_UNIQUEL1,SESSION1);
endif;
Hope this can help you.
Regards.