NIPO ODIN Version 5.17

Previous Topic

Next Topic

Scenario 1: Using System-defined Interview Numbers

This scenario applies the following directives:

  • We start the survey with household records (each household a separate record).
  • For the first respondent in the household we ask the family size and the names of all family members.
  • For each extra respondent in the family a new family member record is created.
  • The system defines the interview numbers to be used for these new records.
  • When the second, third, et cetera family member are interviewed, the screener questions about family size are skipped.
  • For each extra family member a new record is created in the data file.

Extra Sample table fields for scenario 1

InterviewNumber DisplayField1 DisplayField2 AskHousehold FamilySize
Int Varchar(45) Varchar(35) Int Int

00000001

New household record

Family #1

1

0

00000002

New household record

Family #2

1

0

00000003

New household record

Family #3

1

0

Example NIPO ODIN questionnaire for *NEXTRECORD: scenario 1

*SAMPLEDATA TTDisplayField1, TTDisplayField2
*SAMPLEDATA AskHousehold, FamilySize, TTInterviewNumber
*TEXTVARS Name[9],NewNumber

*TAB 30

*************************************************
**** Ask household situation only first time ****
*************************************************

*IF [AskHousehold <> 1] *GOTO 3

*QUESTION 1 *NUMBER 61L1 *SAVE FamilySize
How many family members are in this household?

*QUESTION 1001 *CODES 62L9 *MULTI *DUMMY

*REPEAT 9
*IF [?R <= Q1] *INCLUDE Q1001 [?R]
*ENDREP

*QUESTION 2 *FORM *CONTROL Q1001 W
What are the names of your family members?

1: 1st person *ALPHA 71L35 *SAVE Name[1]
2: 2nd person *ALPHA 106L35 *SAVE Name[2]
3: 3rd person *ALPHA 141L35 *SAVE Name[3]
4: 4th person *ALPHA 176L35 *SAVE Name[4]
5: 5th person *ALPHA 211L35 *SAVE Name[5]
6: 6th person *ALPHA 246L35 *SAVE Name[6]
7: 7th person *ALPHA 281L35 *SAVE Name[7]
8: 8th person *ALPHA 316L35 *SAVE Name[8]
9: 9th person *ALPHA 351L35 *SAVE Name[9]

*PUT TTDisplayField1 '*?Name[1]'
*PUT AskHousehold [0]

*REPEAT 9 *CONTROL Q1001 W
*** make sure that the NewNumber variable is reset
*** before each call to *NEXTRECORD!
*PUT NewNumber [0]
*IF [?R > 1] *NEXTRECORD NewNumber "TTDisplayField1=*?Name[?R], \
FamilySize=*?FamilySize, AskHousehold=*?AskHousehold"
*ENDREP

******************************************************
*** Questions for all family members *****************
******************************************************

*QUESTION 3 *CODES 386L1
Does *?TTDisplayField1 have his/her own mobile telephone?

1: Yes
2: No

*QUESTION 4 *OPEN 387L1 *IF [Q3,1]
Who is the provider of that mobile telephone?

*QUESTION 9999
These were all questions for *?TTDisplayField1.

If any persons left in the household, the interview is restarted for the next.

*END

The field AskHouseHold is used to skip the screening questions if further household members are interviewed.

If the value of NewNumber is set to 0, the *NEXTRECORD command creates a record and automatically assigns an unused InterviewerNumber value. For any value in the range 1-99999999, it attempts to create a record with that InterviewNumber value. Make sure that the NewNumber variable is initialized in the *REPEAT loop every time. If you forget to initialize it with zero, it would attempt to either create or update consecutive records with the given value, which results in a runtime error message "Error in *NEXTRECORD: Sample record [n] is not valid for interviewing". A failed attempt to create or update a record returns the value -1 for NewNumber.

Note that the InterviewNumber values created by the system are not linked to the original family member records. If you require a link between these values, it is highly recommended to save a family member ID with the sample records.

See Also