Page 1 of 1

Invalid Record Type

Posted: August 23rd, 2016, 2:42 am
by MrTaco
and I used this logic:
Invalid Record Type.png

Code: Select all

 
 
PROC DATA_QUESTIONNAIRE_TYPE
  
if DATA_QUESTIONNAIRE_TYPE = 1 then 
  //GETOTHER(2);  {parameter = question number}
  loadcase(SABSSM_V_HOUSEHOLD_QUEST_DICT);
  enter SABSSM_V_HOUSEHOLD_QUESTIONNA_FF;
       writecase (SABSSM_V_HOUSEHOLD_QUEST_DICT);
  
elseif DATA_QUESTIONNAIRE_TYPE = 2 then
  //GETOTHER(2);  {parameter = question number}
        loadcase(SABSSM_V_FIFTEENANDOLDER_DICT);
        enter FIFTEEN_AND_OLDER_QUESTIONNAI_FF;
        writecase (SABSSM_V_FIFTEENANDOLDER_DICT);
       
       elseif DATA_QUESTIONNAIRE_TYPE = 3 then
  //GETOTHER(2);  {parameter = question number}
  loadcase(QUESTIONNAIRE_FOR_CHILDR_DICT);
  enter CHILDREN_AGED_12_TO_14_YEARS_FF;
        writecase (QUESTIONNAIRE_FOR_CHILDR_DICT);
  
  elseif DATA_QUESTIONNAIRE_TYPE = 4 then
  //GETOTHER(2);  {parameter = question number}
  loadcase(GUARDIAN_OF_CHILDREN_0_1_DICT);
  enter GUARDIAN_OF_CHILDREN_0_11_YEA_FF;
        writecase (GUARDIAN_OF_CHILDREN_0_1_DICT);
 
endif;
and another thing that, when I discard it doesnt locate the previous dictionary that was captured
please advice.

Re: Invalid Record Type

Posted: September 8th, 2016, 2:46 pm
by Gregory Martin
I'm not sure exactly what your program is doing, but generally you'll get that Invalid Record Type error if:

1) The case is found but has an invalid record.

2) The case is not found and there are no cases in the data file.

Generally when you use loadcase you use it with it parameters. If you use it without parameters, then it tries to load the "next case" in the file. If there are no additional cases, you may get that error.