• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Symbol Functions
      • Item Functions
      • Array Object
      • Audio Object
      • Barcode and QR Codes
      • Case Object
      • 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
        • savesetting Function
        • SetLanguage Function
        • SetProperty Function
        • SetValueSet Function
        • 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
    • 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>

ExecPFF Function

Format
b = execpff(pff_filename ‖ pff_nameʃ, flagsʅ);
Description
The execpff function starts another CSPro application. This function is useful when designing menu programs or when conducting surveys that use multiple machines on which the path of the CSPro executables may differ. The function is very similar to execsystem, but instead of passing the name of an application or task, you supply a string expression, pff_filename, containing the name of a CSPro application's Program Information File (.pff), or pff_name, the name of a Pff object. If using a modified but unsaved pff object, it will be saved to a temporary file and then executed.
An optional set of flags, described in the execsystem helps, allow you to control how the CSPro application is opened.
Tools Running in the Same Process
Typically the execpff function opens a CSPro application as a new program (meaning, for example, that two processes will be running: the one that called execpff and one for the launched program). However, some tools can run in the same process as the application that called the function. If the wait flag is used when calling execpff, the following tools will run in the same process: Compare Data, Concatenate Data, CSView, Index Data, Pack Application, Paradata Concatenator, Reformat Data, and Sort Data.
Mobile Behavior
On mobile devices, multiple data entry applications cannot be run simultaneously, so the function simply stores the file name of the PFF. When the mobile application returns to the Entry Applications screen, whether via user interaction or via the stop function, the passed PFF will be launched. Using stop as a flag will cause the PFF to be launched immediately.
If the PFF file that launched the application that calls this function specified an OnExit parameter, the pff_filename specified by this function will override the OnExit parameter.
Return Value
The function returns a logical value of 1 (true) if the new application is started successfully and 0 (false) otherwise.
Example
PROC MENU

   
if MENU = 1 then
       
execpff("Household.pff", stop);

   
elseif MENU = 2 then
       
execpff("Agriculture.pff", stop);

   
endif;
See also: Pff.exec Function, ExecSystem Function (Desktop), ExecSystem Function (Mobile)