• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
      • Introduction to CSPro Language
      • CSPro Program Structure
      • Programming Standards
      • Change Code Properties
      • Code Folding
      • Debugging CSPro Applications
      • Declaration Section
      • Procedural Sections
      • Logic
      • Language Elements
        • Version
        • Delimiters
        • Comments
        • Preprocessor
        • Variables and Constants
        • Expressions
        • Operators
        • Files
          • External Files
          • Lookup Files
          • Working Storage File
        • Miscellaneous
      • JavaScript Use in CSPro
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
    • Text Templates
    • Templated Reporting System
    • HTML, Markdown, and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataManager>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Lookup Files

A lookup file (external file) is a text file that can be used in a data entry or batch application from which you retrieve data to display on a form or to use in a calculation. It requires a CSPro data dictionary. Possibilities include:
  • Geographic codes and names. Your application could show the name corresponding to the code the user keyed.
  • Industry and occupation codes. Your application could ensure the user keys a valid code.
  • Last year's data. Your application could look up a corresponding field from last year's data and calculate a percentage change.
  • Generalized menu choices. Your application could read a lookup file and show the contents on the screen as a menu, then convert the user's choice to a code.
To use a lookup file (external file) in your application, do the following:
  • Create the lookup file and its data dictionary
  • Close the lookup file's data dictionary
  • Create a data entry or batch edit application with a standard forms file and data dictionary.
  • Insert the lookup file's data dictionary into the application.
  • Add logic to the application to manipulate the lookup file. The loadcase and selcase functions are particularly useful.
Note: The CSPro examples include an application that demonstrates the use of a lookup file. This is normally installed in a subfolder of the Documents folder, "CSPro\Examples 8.1".