Error message

Discussions about CSEntry
Post Reply
Ricardo
Posts: 4
Joined: January 29th, 2017, 8:03 pm

Error message

Post by Ricardo »

Hi everybody. I am using this code from example and i have a problem with this error:

ERROR: Single variable - cannot have subscript (unexpected left parenthesis) near line 12 in DEPTO procedure

Best regards

Code: Select all

PROC GLOBAL
numeric i;
array aCodMuni(153);  //Códigos de municipio para el set de valores
array alpha(40) aNomMuni(153); //Nombres de municipio en el arreglo


PROC LBZIKA1_DIC_FF

PROC DEPTO
PREPROC
LF_DEP = DEPTO;
if loadcase(AREADIC_DICT, LF_DEP) = 0 then 
  errmsg("Departamento No existe, please reenter");
  MOVE DEPTO; 
endif;

do varying i = 1 until i > noccurs(AREADIC_DICT.AREADIC_REC)
 aCodMuni(i-1) = LF_MUNI(i); 
 aNomMuni(i-1) = LF_NMUNI(i);
enddo;

aCodMuni(i-1) = notappl;

setvalueset(MUNI, aCodMuni, aNomMuni);
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Error message

Post by josh »

Please post the application. You can use the pack tool to create a zip file to upload.
Ricardo
Posts: 4
Joined: January 29th, 2017, 8:03 pm

Re: Error message

Post by Ricardo »

Thank you very much for your response, I attached the zip file
Attachments
LBZika.zip
(6.5 KiB) Downloaded 219 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Error message

Post by josh »

The application is missing the dictionaries. Please use the pack application tool. It will automatically include the dictionaries.
Ricardo
Posts: 4
Joined: January 29th, 2017, 8:03 pm

Re: Error message

Post by Ricardo »

Sorry, now I have included the dictionary
Attachments
LBZika1-DE.zip
(10.94 KiB) Downloaded 240 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Error message

Post by josh »

The problem is that AREADIC_REC is a singly occurring record. In the dictionary the MAX is set to 1. Change the MAX to maximum number of municipo you have in a departmento. Also, the item LF_MUNI should NOT an be an id-item in your dictionary. It should be part of the record. The only id-item in AREADIC should be LF_DEPTO.
Ricardo
Posts: 4
Joined: January 29th, 2017, 8:03 pm

Re: Error message

Post by Ricardo »

Thanks, I did what you told me and works perfectly, now you need to test it with CsEntry
Post Reply