How to Create a Tracking sheet on a Household Questionnaire

Other discussions about CSPro
Forum rules
New release: CSPro 8.0
Post Reply
MrTaco
Posts: 128
Joined: November 18th, 2014, 1:55 am

How to Create a Tracking sheet on a Household Questionnaire

Post by MrTaco »

Hi Guys

1. I want to create a tracking sheet for household, so that supervisors can be able to look at it instead of going through the Questionnaire and check how many household member is captured.
2. I tried to load a household dict using this logic but it doesn't do what I want. please help guys. I loaded a household dict as external file or maybe am missing something.

PROC SMALL_AREA_LAYER
if !ispartial() or addmode then
SMALL_AREA_LAYER = HH_SMALL_AREA_LAYER;
INDIVIDUAL_PROVINCE = HH_PROVINCE
endif;
$ = loadcase(SABSSM_V_HOUSEHOLD_QUEST_DICT,HH_SMALL_AREA_LAYER,HH_PROVINCE);
if $ = (SMALL_AREA_LAYER <=> HH_SMALL_AREA_LAYER)and (INDIVIDUAL_PROVINCE <=> HH_PROVINCE) then
errmsg("Small Layer Area do not match");
// reenter;
endif;

Regards
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: How to Create a Tracking sheet on a Household Questionnaire

Post by Gregory Martin »

I think that there are a couple things that you want to clean up here.

1) loadcase returns 1 or 0 based on whether it succeeds or not. I don't think that you want to assign that to $ (SMALL_AREA_LAYER).

2) Do you mean to use the "if and only if" operator, <=>? This is not a common operator to use.

Usually loadcase code is like this:
EXTERNAL_DICTIONARY_ID1 = { something };
EXTERNAL_DICTIONARY_ID2 =
{ something };

if not loadcase(EXTERNAL_DICTIONARY,EXTERNAL_DICTIONARY_ID1,EXTERNAL_DICTIONARY,ID2) then
    
errmsg("Could not locate the case in the external dictionary.");
    
reenter;
endif;
MrTaco
Posts: 128
Joined: November 18th, 2014, 1:55 am

Re: How to Create a Tracking sheet on a Household Questionnaire

Post by MrTaco »

Code: Select all

PROC FIFTEENANDOLDER_PROVINCE

FIFTEENANDOLDER_PROVINCE = HH_PROVINCE;
FIFTEENANDOLDER_DISTRICT = HH_DISTRICT;
FIFTEENANDOLDER_SMALL_AREA_LAYEV  = HH_SMALL_AREA_LAYER;
HH_VPN = YEARS_AND_OLDER_VISITING_POINT;
HH_QNR_NO = YEARS_AND_OLDER_HOUSEHOLD_QUES;

if loadcase(SABSSM_V_FINAL_QUESTIONN_DICT,HH_PROVINCE,HH_DISTRICT)= 0 then 
   errmsg("Could not locate the case in the external dictionary.");
    reenter;
endif;
am getting this error message:
ERROR: One-level external dictionary name expected near line 9 in FIFTEENANDOLDER_PROVINCE procedure
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: How to Create a Tracking sheet on a Household Questionnaire

Post by josh »

Make sure that SABSSM_V_FINAL_QUESTIONN_DICT is the correct name of the external dictionary and that it is spelled correctly.
MrTaco
Posts: 128
Joined: November 18th, 2014, 1:55 am

Re: How to Create a Tracking sheet on a Household Questionnaire

Post by MrTaco »

3.png
3.png (12.32 KiB) Viewed 7007 times
4.png
4.png (3.88 KiB) Viewed 7007 times
it is the correct dict and the spelling is correct
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: How to Create a Tracking sheet on a Household Questionnaire

Post by Gregory Martin »

The other part of Josh's comment was about checking that the dictionary is an external dictionary. Have you verified this? You cannot use the main input dictionary in the loadcase function.

The other restriction is that you cannot use a two-level dictionary in the loadcase function.
MrTaco
Posts: 128
Joined: November 18th, 2014, 1:55 am

Re: How to Create a Tracking sheet on a Household Questionnaire

Post by MrTaco »

I manage to link the dictionaries but if I Discard it's no longer read from the captured dict... i must not discard to avoid lose of tracking...
so in a case where interviewer discard by mistake it will be a problem.

how can not lose track of the captured file(Household) to link with the (individual)?
Post Reply