• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
      • Introduction to Data Dictionary
      • Organization
      • Dictionary Concepts
        • General
        • Levels
        • Records
        • Items
          • Item Description
          • Identification Items
          • Subitems
          • Item Properties
          • Starting Position
          • Length
          • Data Type
          • Binary Dictionary Items
          • Occurrences
          • Decimal Places
          • Decimal Character
          • Zero Fill
        • Value Sets
        • Values
        • Relations
      • Data Dictionary Application
      • How to ...
    • The CSPro Language
    • 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>

Subitems

Subitems allow items to be broken up into smaller pieces, or across broad categories. In this respect, they let you redefine data items and refer to the same data field in several different ways. The start position of a subitem must be within its parent item.
One useful application of subitems involves date and time fields. A date item, for example, could be referred to as a single 8-digit entity: YYYYMMDD. However, this does not allow you to easily manipulate or refer to a portion of the date (such as the year, month, or day itself). Suppose you had the following definition for date (for demonstrative purposes, only selected item properties are shown):
Item LabelItem NameStartLenItem Type
Date of birthDOB208Item
To redefine this item into subitems, you only need to add the following subitems:
Item LabelItem NameStartLenItem Type
Year of birthDOB_YEAR204Subitem
Month of birthDOB_MONTH242Subitem
Day of birthDOB_DAY262Subitem
Another reason for using subitems is to make data references available across larger categories. Censuses and surveys often have items of three or four digits in length representing categories such as industry, occupation, or ethnicity. For example, looking at occupation codes:
  • the full value refers to a very detailed occupation, such as bus driver
  • The first digit alone refers to the 'major' division, such as 'public service'
  • The first two digits together refer to a more detailed 'major' division, such as 'public transportation'
It may be useful to test the ranges with the CSPro language at the item level. In tabulation applications, tables can be made at the major (1- or 2-digit) or minor (3- or 4-digit) divisions. The following example could represent part of an economic survey:
Item LabelItem NameStartLenItem Type
OccupationOCCUPATION454Item
Occupation, MajorOCC_MAJOR451Subitem
Occupation, Sub-majorOCC_SUBMINOR452Subitem
Occupation, MinorOCC_MINOR453Subitem
Note: Identification items cannot have subitems.
See also: Item Description, Identification Items, Item Properties, Add or Modify Items