NIPO ODIN Version 5.17
*COPY
Purpose
Transfers data within a questionnaire.
Syntax
*COPY <Qn> <Qm|[expression]|"text">
Description
This command is also allowed under condition. Data specified in the second argument will be transferred to the data field specified in the first argument. *COPY is interpreting the contents of data fields to be moved. The original contents of the receiving data field, if any, will be replaced.
Arguments
Qn The question reference of the data field where the data will be transferred to (i.e. the receiving field).
Qm The question reference of the data field that will be transferred (i.e. the sending field).
expression If an expression is given as second argument the result of the expression will be a value. This value will then be put as data in the receiving data field.
text This text will be transferred literally to the receiving data field. It is allowed to refer to a variable in the text. In that case, the contents of this variable will be embedded in the text and then will be transferred to the receiving data field.
Remarks
- It is recommended to use the same question type for both sending and receiving fields.
- If the data that has to be transferred consists only of digits, NIPO ODIN regards this as a number. Therefore, to transfer data from a multiple question you have to use
*INCLUDE . - When using the
*INCLUDE command to include codes in a single-coded question, the contents will be set to the highest code. Use the *COPY command to overwrite original contents. - Contrary to the
*INCLUDE command the *COPY command will give warning messages when data positions are used more than once. Use the *INCLUDE command to suppress these warnings. - When a question already contains the category that was copied, nothing changes.
Example 1
*QUESTION 1 *CODES 71L2 *COPY Q1 [3]
The contents of Q1 will be 03.
Example 2
*QUESTION 1 *CODES 71L2 *QUESTION 2 *CODES 81 *COPY Q1 Q2
The contents of Q2 are stored in Q1. For example, if Q2 contains 8, the contents of Q1 will be 08.
|