• <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
        • Pff Statement
        • Pff.load Function
        • Pff.save Function
        • Pff.getProperty Function
        • Pff.setProperty Function
        • Pff.exec Function
      • 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
      • 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>

Pff.save Function

Format
b = pff_name.save(pff_filename);
Description
The Pff.save function saves the contents of the Pff object to the disk to a PFF file with the name supplied by the string expression pff_filename. Because Pff objects can be executed without saving them, this function is not necessary, but may be useful if you want a copy of your PFF file on the disk.
Return Value
The function returns a logical value of 1 (true) if the PFF was successfully saved and 0 (false) otherwise.
Example
// create PFFs for running the listing application for each province
Pff listing_pff;
listing_pff.
load("Listing.pff");

do numeric counter = 1 while counter <= PROVINCE_VS.length()

    listing_pff.
setProperty("Description", maketext("List in %s", PROVINCE_VS.labels(counter)));
    listing_pff.
setProperty("Key", maketext("%02d", PROVINCE_VS.codes(counter)));

   
string new_pff_filename = maketext("Listing%02d.pff", PROVINCE_VS.codes(counter));
    listing_pff.
save(new_pff_filename);

enddo;
See also: Pff Object, Pff.load Function