• <Helps for GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Array Object
      • Audio Object
      • Barcode and QR Codes
      • Document Object
      • File Object
      • Freq Object
      • Geometry Object
      • HashMap Object
      • Image Object
      • List Object
      • Map Object
      • Path
      • Pff Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
        • Compress Function
        • Decompress Function
        • Diagnostics Function
        • Encode Function
        • ErrMsg Function
        • ExecSystem Function (Desktop)
        • ExecSystem Function (Mobile)
        • ExecPFF Function
        • GetProperty Function
        • GetLabel Function
        • GetLanguage Function
        • GetSymbol Function
        • GetValueLabel Function
        • Hash Function
        • HtmlDialog Function
        • InValueSet Function
        • Invoke Function
        • IsChecked Function
        • LoadSetting Function
        • LogText Function
        • MaxValue Function
        • MinValue Function
        • Paradata Function
        • PathConcat Function
        • PathName Function
        • Report Function (Deprecated)
        • SaveSetting Function
        • SetLanguage Function
        • SetProperty Function
        • SetReportData Function (Deprecated)
        • SetValueSet Function
        • SetValueSet Function With Arrays
        • SetValueSets Function
        • Special Function
        • SqlQuery Function
        • Stop Function
        • SysParm Function
        • Tr Function
        • Trace Function
        • UUID Function
        • View Function
        • Warning Function
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
      • Export Attributes
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Appendix
  • <Helps for CSEntry>
  • <Helps for CSBatch>
  • <Helps for CSTab>
  • <Helps for DataViewer>
  • <Helps for TextView>
  • <Helps for TblView>
  • <Helps for TRSWin>
  • <Helps for CSDeploy>
  • <Helps for CSPack>
  • <Helps for CSFreq>
  • <Helps for CSSort>
  • <Helps for CSExport>
  • <Helps for CSReFmt>
  • <Helps for CSDiff>
  • <Helps for CSConcat>
  • <Helps for TRSSetup>
  • <Helps for ParadataViewer>
  • <Helps for ParadataConcat>
  • <Helps for CSIndex>
  • <Helps for Excel2CSPro>
  • <Helps for CSWeb>

Paradata Function

Format
d = paradata(action_typeʃ, argument1, ..., argumentNʅ);
Description
The paradata function performs an action related to the paradata log. The first argument, action_type, must be one of the following:
action_typeDescription
concatConcatenates several paradata logs into a single log. The first argument is the file name of the output log. The subsequent arguments are the file names (as string expressions or string lists) of input logs. You can concatenate into the currently open paradata log, but in that case you must also include the currently open paradata log as an input.
queryExecutes a query on the paradata log. This is the same as: sqlquery(filename(paradata),...).
openOpens a paradata log to start logging events. Specify the file name as a string expression as the sole argument.
closeCloses the currently open paradata log.
flushWrites all cached paradata events to the log. This is rarely needed, and may only be necessary if you want to query the paradata log from an external application.
It is not recommended that you open or close paradata logs via logic, as the log will not contain all of the initializing features that exist when specifying the paradata log when the application begins (and via the PFF file).
Return Value
For the open, close, and flush actions, the function returns a logical value of 1 (true) if successful and 0 (false) otherwise. For the concat action, the function returns the number of paradata logs concatenated, or default upon error. Look at the documentation for the sqlquery function to see the return values for the query action.
Example - Concat
list string logs_list;

dirlist(logs_list, "C:\Survey\Paradata", "*.cslog");

// add the paradata logs into the currently open log
paradata(concat, filename(paradata), filename(paradata), logs_list);
Example - Query
string message_events_query = maketext(
   
"SELECT COUNT(*) "
   
"FROM message_event "
   
"JOIN event ON message_event.id = event.id "
   
"JOIN case_instance ON event.case_instance = case_instance.id "
   
"JOIN case_info ON case_instance.case_info = case_info.id "
   
"WHERE case_info.uuid = '%s';",
   
uuid(DICT_NAME));

numeric message_events_for_this_case = paradata(query, message_events_query);
See also: Paradata, SqlQuery Function, SyncParadata Function