This document is a guide to installing, configuring and using the JetTrac Calc™ Agent. This document includes detailed instructions for installation and configuration of the Adobe Central Job Management Database and example files to help you see how the program works.
There are cases when calculations need to be performed in an Adobe Central application. Central Pro used to have a Calculation Agent but in starting in version 5.3 it is no longer included. The Transformation Agent can do certain calculations but that is only used if you are transforming an ASCII file (e.g. Print Image File) to a Field Nominated File. If you are creating a Field Nominated File from your application you are probably not going to be able to use the calculation capabilities in the Transformation Agent. Also there are certain kinds of calculations (e.g. running/breaking subtotals) that are either not possible to do within Central or very difficult to do in preamble files.
JetTracCalc™ was developed to perform arithmetic calculations based on data in an input Field Nominated File. The “calculations” are defined in an external definition (INI) file. See Section 3.3 for a more detailed explanation of the functionality of JetTrac Calc™.
If you need assistance in installing and configuring JetTrac Calc™, call Pro Technology Automation, Inc. at 805-527-1248 or email us at firstname.lastname@example.org. Please note that the JetTrac Calc™ license fee does not cover installation, configuration, implementation or technical support so there may be an additional charge if you need those services. Please ensure you read these instructions carefully before calling for technical support.
Installing JetTrac Calc™ is a two step process. You will receive an installation zip file. Simply unzip the files to the desired folder. The following files will be installed:
JTCalc.jar Java program
JetTrac Calc User Guide.pdf This document
Input.dat sample data file to test
JTCalc.ini INI file
Run JTCalc.bat Sample batch file
InputSubform.dat Subform data file to test
JetTracCalcSubform.ini Subform INI file
Run JTCalcSubform.bat Subform batch file
The second step is to install the latest version of the Java™ RunTime Environment (JRE). For Windows 95/98/NT, install JRE 1.3.0.
A JetTrac Calc INI file will be built for each Adobe Central application that you want to perform calculations and will contain the instructions for the calculations for that application. You can name the INI file anything you want and specify the INI filename in the Adobe Central Job Management Database as specified in this document.
To set up the INI file, open the JetTrac CalcTest.ini in WordPad. It looks like this:
First field name for each document
Do Calculations only when value of Line 1 changes
Ignore “field” and do calcs for entire file
Maximum Number of Records to process
The fields are set up as follows:
Line # Description Sample value
1 First Field Name in each document StartRec
2 Y = do calculations only when value of Line 1 N/dummy
changes. N = ignore this option.
3 Y = ignore “field” and do calcs for entire file. N
4 Maximum number of records to process 1000
5+ New field name plus calculation logic
Note: The format of lines 5 and on is the new field name (e.g. ^field GrandTotal or ^global Extended Price) followed by a pipe followed by a + or – or * or / followed by a field name, then repeated for the rest of the calculation. A practical example is:
Since JetTrac Calc™ is a Java program, Java (the Java Runtime Environment) is run. You specify the following parameters to run JetTrac Calc from the command line (e.g. from a batch file):
Java -jar <folder>JTCalc.jar Input.dat Output.dat JTCalc.ini jfserver.log
Here is an explanation of each component of the above command line:
java – the Java Runtime Environment
-jar is the java command that a jar file is specified
<folder> is the folder where the JTCalc.jar file is located
JTCalc.jar is the Java program
Input.dat is the input filename (specified as @InFile in the Task Definition)
Output.dat is the output filename (specified as @OutFile in the Task Definition)
JTCalc.ini is the fully qualified INI filename for this application
Jfserver.log is the fully qualified logfile name
To add the JetTrac Calc custom agent in Adobe Central Control for Windows platforms:
1. Register the JetTrac Calc™ Custom Agent to Adobe Central by going to Windows Explorer, go to the folder where you installed Adobe Central and open the file JFSERVER.INI in WordPad. In the section titled “[Processes]”, add a new line at the very bottom of the section as follows:
JetTracCalc=JetTracCalc Custom Agent
Now, scroll down to the bottom of the JFSERVER.INI file and add a new section as shown here:
EditCfgRtn=notepad C:\jfsrvr\CustomAgents\JetTracCalc JetTracCalc.ini
2. Start Central Control by clicking Start, Programs, Adobe Central, Central Control (may be slightly different for your installation). You will get the following screen:
3. Select Configuration, then Configure Adobe Central and Agents, then scroll down to the bottom of the list. You will now see JetTracCalc Custom Agent. Click once to highlight it, then click the Edit File button. You will see the INI file.
4. Modify the file for your application per the instructions in this installation guide. Save the file and exit.
Create the JetTrac Calc task by clicking on File, Job Management Database, Tasks, then click New Task. You will get a blank screen. Set up the Task Definition with the following information:
Task Id: JTCalc
Program name: java –jar c:\jfsrvr\CustomAgents\JTCalc\JTCalc.jar
Program options: @InFile @OutFile @PreambleName @LogFileName
Comment: JetTrac Calc Custom Agent
a. The Program Name of java -jar is the Java program. This will be specified differently for each platform that JetTrac Calc is installed on.
b. The Program Options are @OutFile, followed by the variable name @PreambleName (which will contain the INI filename), followed by @LogFileName
Your screen will like the following. Note that the screenshot is not wide enough to show all the program options:
4. Click OK to save the Task Definition.
5. The second part of configuring the Job Management Database is to add a new Job Step to a new or existing Job Definition to run JetTrac Calc™. From the main screen of Central Control, click File, Job Management Database, Jobs. You will get a list of all jobs you have set up in Adobe Central. We will assume that you already have a job set up and you are adding a new Calculation step. Click on the Job that you want to sort, then click “New Step”. The New Job Step screen will appear. Following are the fields that you need to fill in:
Task ID – from the drop down list, select JTCalc
Input File – the value that goes here would be a single letter which is the output from the previous job step. If your current job had two steps, JFTRANS and JFMERGE, then the output from JFTRANS was “A”. If you now want to perform a calculation on this file, then the Input file for JetTrac Calc would be A. If you have questions about how this works, contact your Adobe Central support person.
Output file – this would be a letter, one higher than the Input File. If the Input File was A, then the Output File would be B
On Error – Select S to Stop the Job if there is an error in JetTrac Calc
Form File – should be blank. Delete the value that appears here
Preamble file – this field would contain the fully qualified INI filename that you have set up for your application, e.g. c:\jfsrvr\CustomAgents\JetTracCalc\JetTracCalc.ini
Printer Name – leave it at the *
Macro Number – leave it at 1
Load Flag – leave it at T
Comments – type in a description like “Performs calculations”
Your screen will look something like this:
6. Close all windows, get back to the main Central Control screen and update the Job Management Database by clicking on Control, Reload Job Management DB.
To submit a transaction file to Adobe Central, you place a data file into the Adobe Central Collector Directory. There are a number of ways to do this depending on the platform that you are running Adobe Central. You can FTP the file, use the Central Print Processor, use Named Pipes or simply copy the file.
Based on a Job Card or unique characteristic of the data file, Adobe Central will run a specific job. JetTrac Calc™ is run if it is one of the steps in the Job as explained above.
When JetTrac Calc™ is run, it reads through the Field Nominated File based on the calculation definition in the INI file. It performs the calculations for each line by reading from left to right in the calculation definition file. It writes all the new field names just prior to the next document (based on the field name in line 1 of the INI file).
JetTrac Calc™ also can calculate running totals from data that prints in subforms. An example of this is an A/P Check that has invoice details that dynamically print in subforms but there is no grand total of Gross Amount, Discount Amount and Net Amount. When JetTrac Calc™ runs, it looks for all occurrences of the specified field name(s) and accumulates the totals until the beginning of the next document. Here is an example:
JetTrac Calc™ conforms to all Adobe Central requirements as a Custom Agent. It writes a status to the log file and creates the JETFORM.RSP.
Here is a sample JETFORM.RSP file:
JTCalc : processing completed, 26 records
Here is a sample entry in the log file for a successful match:
19990925210349 JTCalc : processing completed, 26 records
Here are the parameters of JetTrac Calc:
a. Maximum of 50 formulas in the INI file
b. Maximum of 20 terms in each formula
c. Maximum line length is 512
d. All calculated values will print just prior to the start of the next document as indicated by Line 1 of the INI file
e. When a calculated number is output, the maximum length is 14 digits, then a decimal then six more digits to the right of the decimal.
f. There must be at least one instance of each field specified in the calculation in each document (defined by line 1 of the INI file).
Included with the installation of JetTrac Calc™ is a sample data file (Input.dat) and a batch file. If you have installed JetTrac Calc™ in the recommended location of c:\jfsrvr\CustomAgents\JetTracCalc, then all you need to do is double-click the batch file RunJetTracCalc.bat. A DOS box will come up and show the processing messages of JetTrac Calc as follows:
JTCalc – Calculate fields in Adobe Central field-nominated files
(c) 2000, Pro Technology Automation Incorporated, Simi Valley, CA
———————— Initialization ————————————
Input file: Input.dat
INI file: JetTracCalc.ini
Total of 2 formulas in INI file.
Total of 5 terms to extract.
Output file: Input.cal
———————— Processing —————————————-
———————— Processing Completed ——————————
JTCalc : processing completed, 26 records