b = execpff(pff_filename ‖ pff_nameʃ, flagsʅ);
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.
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.
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.
The function returns a logical value of 1 (true) if the new application is started successfully and 0 (false) otherwise.