• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
      • Introduction to Tabulation
      • Parts of a Table
      • Parts of the Table Tree
      • Common Uses of Tabulation
      • Capabilities of Tabulation
      • Creating Tables
      • Formatting Tables
      • Creating Tables by Geographic Area
      • Printing Tables
      • Tabulation Preferences
      • Saving and Copying Table Data
      • Table Post Calculation
      • Run Production Tabulations
        • Introduction to Production Tabulations
        • Run All in Batch
        • Run in Parts
          • Introduction to Run in Parts
          • Run Tabulate Interactively
          • Run Tabulate in Batch
          • Run Consolidate Interactively
          • Run Consolidate in Batch
          • Run Format Interactively
          • Run Format in Batch
      • Advanced Table Topics
      • Table Tips and Tricks
    • 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>

Run Format in Batch

 

You can run the format process from a batch program by executing CSTab.exe and using a PFF file as the command line parameter. For example, if your PFF file name is "MyTabs.pff", you can launch CSTab by:

 

Start /wait "C:\Program Files (x86)\CSPro 8.1\CSTab.exe" MyTabs.fmt.pff

 

This launches the program CSTab.exe to run with the parameters specified in the PFF file MyTabs.pff. Note that using Start /wait is not strictly necessary; it simply ensures that the command does not terminate until CSTab.exe has finished processing. This is useful when there are other commands that follow which depend on CSTab completing before they can be executed.

 

You can create a PFF file in two ways:

  • Run the tabulation from CSPro. It will save the *.PFF file it generates in the same folder with your tabulation application. The *.PFF will have the same name as the application with .PFF appended. Rename and modify this file with a text editor (such as Notepad or Wordpad).

  • Create a new *.PFF file using a text editor.

The following shows an example a PFF file for the format process. Note that a PFF file is not case sensitive. You can use any combination of upper and lower case text.

 

[Run Information]

Version=CSPro 8.1

AppType=Tabulation

Operation=Format

 

[Files]

Application=.\MyTabs.xtb

FormatInputTAB=.\MyData.dat.con.tab

AreaNames=.\MyAreaNames.anm

Listing=.\MyTabs.xtb.fmt.lst

OutputTBW=.\MyTables.xtb.tbw

 

[Parameters]

ViewListing=OnError

ViewResults=No

 

The [Run Information] block is required and must appear exactly as shown in the example above.

 

The [Files] block is required and defines all files used in the tabulation run. A description of the files is as follows:

  • Application = the tabulation application you created

  • FormatInputTAB = the input table matrices file – This is output from the tabulate or consolidate process.

  • Listing = a report of the tabulation processing

  • AreaNames = the area names file, only if there is area processing

  • OutputTBW = the output formatted tables

 

If any required files are not coded or are missing, the file association dialog box will be displayed allowing you to fill in or change the missing file names.

 

The [Parameters] block is optional. If allows to specify additional aspects of the tabulation run.

  • ViewListing = specifies how the tabulation run listing is displayed. If ViewListing is missing, Always is assumed.

Always - the listing is always displayed

OnError - the listing is displayed only when an error occurred

Never - the listing is never displayed

  • ViewResults = specifies whether or not the formatted tables file (*.TBW) is displayed in TableViewer at the end of the run. If ViewResults is missing, Yes is assumed.

Yes - the tables are displayed

No - the tables are not displayed

 

See also: Run Tabulate in Batch, Run Consolidate in Batch