To reformat data in production mode, you'll need to customize its behavior by creating a PFF file. You can then use the PFF file as a command line parameter for CSReFmt.exe (the associated filename of this utility). For example, if you name your PFF file MyReFmt.pff, you can run CSReFmt by doing the following from the command prompt or a desktop icon:
"C:\Program Files (x86)\CSPro 7.1\CSReFmt.exe" MyReFmt.pff
This assumes that CSPro was installed in the default directory. Your PFF file must have a .pff extension.
The PFF file is a text file so you can create and modify it using any text editor (such as Notepad or Wordpad). A PFF file is not case sensitive, so you can use any combination of upper and lower case text. Or, you can run CSReFmt once, and a PFF file will be automatically created for you—it will be named CSReFmt.pff, and will be placed in the same folder as your input dictionary. The following is an example of a CSReFmt PFF file.
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 that could be used in the reformat process.
- At a minimum, the Listing=, InputDict=, and OutputDict= lines must be provided. If only these files are defined, then CSReFmt will compare the dictionaries and report what fields will be dropped, added, resized, or otherwise modified if the reformat were to occur. If the InputData and OutputData files are defined, then the reformat operation will actually take place.
- InputData is the data file to reformat from, and OutputData is the reformatted data file.
- By default, the listing file will be placed to the same folder as the OutputData file.
The [Parameters] block is optional.
- ViewListing= determines whether or not the report on the reformat operation is displayed with TextViewer at the end of the run. The report only indicates what fields were dropped, modified, etc., it does not actually show you the newly reformatted data file. If ViewListing=Never, then the report is not displayed. If ViewListing=OnError, then you will only see the report if any error occurred during the compilation of the report. If ViewListing=Always, then the results will always be shown. If the line is missing the listing will be displayed by default.
- ViewResults= determines whether you view the newly reformatted data file. Available options are "Yes" and "No." If the PFF file was automatically generated, this entry will default to "No." If the line is missing the results will not be shown.