You can run a complete tabulation 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.0\CSTab.exe" MyTabs.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 of a tabulation PFF file. 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.0
AppType=Tabulation
Operation=All
[Files]
Application=.\MyTabs.xtb
InputData=.\MyData.dat
Listing=.\MyTabs.xtb.lst
AreaNames=.\MyAreaNames.anm
OutputTBW=.\MyTables.xtb.tbw
[Parameters]
ViewListing=OnError
ViewResults=Yes
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 edit application you created
InputData = the data file to be tabulated -- If there is more than one input data file, insert multiple InputData lines.
Listing = a report of the tabulation processing
AreaNames = the areanames file used 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 or an invalid subscript warning 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