Please enable JavaScript to view this site.

CopiaFacts Reference

To extract data to daily TSV files, it is necessary to supply one or more DX_ control variables (in FAXFACTS.CFG) which themselves contain variables for each field to be written, separated by vertical bar (|) characters.  The separators are automatically changed to TAB characters in the output file.  For example a minimal specification for recording completed fax transactions might be:

$var_def DX_FAX_COMPLETE "@FSNUM|@OC_CODE|@OC_CSID|@OC_APAGES|@DATA1"

In practice you can provide a much larger set of variables if you wish (the maximum command-line length is 8000 characters).  Including the FSNUM variable helps to provide a trail back to the original transaction if any query should arise on the output.  The PR_MCFNUM variable performs a similar function for incoming fax.

You are encouraged to set up a standard set of DX_ variables, based on the supplied examples, and to avoid frequent changes. When you change the fields, you can no longer usefully concatenate the daily files to create an XLSX for recording and analysis.
If you do a monthly analysis and have to change DX_ variables mid month, you should split the month using manually set ranges in CATDX.  If you name the path to the older FAXFACTS.CFG on the CATDX command-line, its variables will be used instead of those in your current configuration file while you analyze the first part of the month.

There are nine different transactions for which data can be extracted.  Separate files are currently written for each COPIAFACTS node and for each transaction type.  In the list below, the first column shows the two-letter suffix which is added to the filename and the second the variable name used to define the fields for each transaction:

FC DX_FAX_COMPLETE
FADX_FAX_ATTEMPT
ECDX_EMAIL_COMPLETE
EADX_EMAIL_ATTEMPT
VCDX_VOICE_COMPLETE
VADX_VOICE_ATTEMPT
SCDX_SMS_COMPLETE
SADX_SMS_ATTEMPT
RFDX_RECEIVE_FAX
RQDX_IVR_REQUEST
WBDX_WORKERBOX

The Data Extraction files are written to the FAXFACTS\XDATA folder, and have a file name of the form:

YYYYMMDD_nodename-serial_xx.TAB     (xx is the suffix above)

If the nodename already contains an underscore and the serial number (for example M1_1234) then the -serial is not added.

The content of messages is specified using the DX_... control variables. If there is a syntax error in the FS file it may not be possible to determine whether it is a fax or e-mail transaction. In this case these 'fax' variant of the message specification variables will be used.

Note that the 'COMPLETE' variable contents are only expanded and written when the FS file transaction is considered completed and the FS file is written to SENT or FAIL.  The 'ATTEMPT' variable contents are also expanded and written when the FS file is scheduled for retry.  For this reason you should not normally specify both for the same transaction type.  These COMPLETE/ATTEMPT differences do not apply in the same way to MSMQ notifications.

Concatenation of multiple extraction files

The process generates a file in FAXFACTS\XDATA for each transaction type and each node, each day.  To bring the files into a useful analysis, use the CATDX program to create an XLSX file covering a selected period of days.  CATDX can be used interactively, or can also be automated to create a regular weekly or monthly analysis. CATDX can aggregate data from:

a single node, selected nodes, or all nodes in a single XLSX.

for the selected node(s), one or more transaction types on separate worksheets in the XLSX.

For more information on running this utility, see the CATDX topic.

Column headings for data extraction

Column headings are not added in the extraction files.  However column headings and formats can be added for use by CATDX.  To do this, define a variable to specify the headings by adding an H as the third character in the above variable names:

$var_def DX_FAX_COMPLETE  "@FSNUM|@OC_CODE|@OC_CSID|@OC_APAGES|@DATA1"

$var_def DXH_FAX_COMPLETE "FS Number|Outcome Code|Remote CSID|Page Count|Reference"

You may also prefix each name with a format letter, size and alignment for the field, separated by a colon:

$var_def DX_FAX_COMPLETE  "....|@OC_CSID|@OC_APAGES|...."

$var_def DXH_FAX_COMPLETE "....|C24:Remote CSID|N:Page Count|...."

There are four format letters:

DUSA Date format: MM/DD/YYYY
TTime format: hh:mm:ss
NNumeric format, to allow Excel functions to perform arithmetic on the field
CText format (default)

The size value measures approximately in characters, although Excel may adjust this when the file is loaded. The size field defaults to 8, except for date fields (D) when it defaults to 10.

There are three alignment letters:

LLeft alignment (default except for N fields)
CCenter alignment
RRight alignment (default for N fields).

If an element in the DXH_ variable is missing, or if there is no headers variable for a DX_ data extraction, then the content of the field definition is used instead, with any @-signs removed.

You should take care that each element in the heading variable correctly matches the field specification.  CATDX (in interactive mode) will report if the element counts are different but cannot check that the content is suitable.
In DXH_ variables, but not in DX_ variables, blank space adjoining a | separator is ignored.  This may make it easier to align fields on successive $var_def lines and to ensure that the correct header is associated with each field.

The CATDX topic has more information about setting up and using data extraction.

Examples:

(Each example is a command on a single line)

$var_def DXH_FAX_COMPLETE 
   "C8:FSNUM|N4:Line|N4:Pages|D:DATE|T:TIME|C14:FaxNum|
    N3:Que|C10:Sender|C15:Desc"

$var_def DX_FAX_COMPLETE 
   "@FSNUM|@LNUM|@OC_SENTPAGES|@OC_DATE|@OC_TIME|
    @RCVRFAX|@OC_PRIORITY|@SENDER|@OC_CLDESC"

$var_def DXH_RECEIVE_FAX
   "C19:MCFNUM|N4:Line|N4:Pages|D:DATE|T:TIME|
    C14:FaxNum|C10:Outcome|C20:CSID|N4:Seconds|
    C12:FaxFile|C12:Mailbox|C8:MCFNUM"

$var_def DX_RECEIVE_FAX 
   "@PR_MCFNUM|@LNUM|@PR_FAXPAGES|@DATE4|@TIME2|
    @PR_ANI|@PR_OUTCOME|@PR_FAXCSID|@DATA4|
    @PR_FAXFILE|@PR_MAILBOX|@PR_MCFNUM"

$var_def DXH_EMAIL_COMPLETE "C8:FSNUM|N4:Line|D:Date|
    C10:OUTCLASS|C30:EMAILTARGET|C60:EMAIL_XSUBJECT"

$var_def DX_EMAIL_COMPLETE "@FSNUM|@LNUM|@LAST_OUTCLASS|
    @DATE4|@EMAIL_TARGET|@EMAIL_XSUBJECT"