• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
      • Introduction to CSPro Language
      • Data Requirements
      • CSPro Program Structure
      • Programming Standards
      • Code Folding
      • Debugging CSPro Applications
      • Declaration Section
      • Procedural Sections
      • Logic
      • Language Elements
        • Version
        • Delimiters
        • Comments
        • Preprocessor
        • Variables and Constants
          • Data Items
          • This Item ($)
          • Subscripts
          • Numbers
          • Boolean Values
          • Special Values
          • Refused Value
          • String Literals
          • Newline Handling
        • Expressions
        • Operators
        • Files
        • Miscellaneous
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Special Values

There are four special values in the CSPro language: missing, refused, notappl, and default. A particular value of a data item can be mapped to one of these special values in the data dictionary. They have the following meaning and uses:
Missing
The value missing indicates that a data item was supposed to have a response and no response was given. Other terms for this are "not stated" and "non-response." To properly utilize this special value, you must create a value set for this item in the dictionary, setting one of the value set entries to the special value "Missing." For example, you could set 8 (or 88, 888, etc.) or 9 (or 99, 999, etc.) to missing. Finally, although you must associate a number with the special value missing, you can only use the = or <> comparison operators against the special value missing; i.e., you cannot refer to the numeric value you assigned it to in your dictionary value set.
Refused
The value refused is similar to missing but has several special attributes regarding how it is handled during data collection. The value indicates that a data item was supposed to have a response but the respondent refused to provide an answer. To properly utilize this special value, you must create a value set for this item in the dictionary, setting one of the value set entries to the special value "Refused."
Notappl
The value notappl indicates that a data item is blank. The item did not have a response because the question did not apply to this respondent. Fields that are skipped during data entry are assigned the value notappl. You can map this value to a number or blanks in the dictionary using the special value "NotAppl," but generally it is best to keep this value defined as blanks.
Default
The value default indicates that a data item or variable has an undefined value. This can result from various circumstances. For example, an invalid calculation in logic (such as a divide-by-zero error) will return the result default. Reading the value of a variable from a data file when the data type specified in the dictionary for the variable is numeric and the value in the data file contains non-numeric characters will cause the variable to become default. The same result occurs if the dictionary does not specify a decimal character for the variable being read but the value in the data file contains one. Additionally, if a numeric variable has numeric subitems, some of which are notappl (blank) then the value of the variable will sometimes be default. For example if the numeric variable DATE has 3 subitems DAY=1, MONTH=notappl, and YEAR=2020, then the value of DATE will be default. The value default can also be written to the data file when the value of the variable being written overflows the length specified for that variable in the dictionary (for example if the value of the variable is 999 but the dictionary specifies a length of 2 for the variable). You can map this value to a number in the dictionary using the special value "Default," but this should generally be avoided.
See also: Special Function, Refused Value, Boolean Values