JetTrac JobCard

Introduction:

This document is a guide to installing, configuring and using the JetTrac JobCard™ Custom Agent. This document includes detailed instructions for installation and configuration in the JetForm Central Job Management Database and example files to help you see how the program works.

Background:

The normal process in a JetForm Central job is to look for a job card in the input file and execute a series of instructions to process the file. There are times when it is not possible for the host application to add a job card to the data file. JetForm provides a simple procedure to look for a string of data in a data file and assign a job card. This only works when there is a fixed string of data like “PURCHASE ORDER” in the first few records of the data file.

JetTrac JobCard was developed to look for an unlimited combination of strings or single characters (or the absence of characters) in a data file or a filename and assign the proper job card. The purpose of developing JetTrac JobCard™ was to replace the standard JetForm Central JFNOJOB processing with a Custom Agent with many more capabilities.

JetTrac JobCard™ is written in Java so it will run on any platform that supports the Java RunTime Environment (JRE). Instructions are provided in this document for downloading the Java Runtime Environment for your platform.

Technical Support:

If you need assistance in installing and configuring JetTrac JobCard™, call Pro Technology Automation, Inc. at 805-527-1248 or email us at support@protechinc.com. Please note that the JetTrac JobCard™ license fee does not cover technical support so there may be an additional charge. Please ensure you read these instructions carefully before calling for technical support.

INSTALLATION AND CONFIGURATION OF JETTRAC JOBCARD™:

 

JetTrac JobCard™ Installation Procedures:

Installing JetTrac JobCard™ is a two step process. You will receive an installation Zip file. Simply double click on the Zip file and unzip the files to the drive letter where JetForm Central is installed (Windows only). The following files will be installed:
Filename Description

JetTrac JobCard.jar Java program

JetTrac JobCard.ini INI file

JetTrac JobCard Installation and User Guide.pdf this document

RunJetTrac JobCard.bat sample batch file to test INI file

Test1.dat sample data file to test
The second step is to install the latest version of the Java™ RunTime Environment (JRE). For Windows XP/NT/2000, install JRE 1.3 for Windows.

Configuring the JetTrac JobCard.ini file:

There are two main steps to complete the configuration of JetTrac JobCard. The first is to set up and test the JetTrac JobCard.INI file. The second is to set up the JFNOJOB task in JetForm Control.
To set up the INI file, open JetTrac JobCard.ini. The fields are set up as follows:
1st Row Row number for start of search string #1

| Pipe to delimit the field

1st Column Column number for start of search string #1

| Pipe to delimit the field

1st String First search string

| Pipe to delimit the field

2nd Row Row number for start of search string #2

| Pipe to delimit the field

2nd Column Column number for start of search string #2

| Pipe to delimit the field

2nd String Second search string

| Pipe to delimit the field

3rd Row Row number for start of search string #3

| Pipe to delimit the field

3rd Column Column number for start of search string #3

| Pipe to delimit the field

3rd String Third search string

and so on……

| Pipe to delimit the field

Job card Job card to assign if match is made
In order to properly set this up, you must examine your data file for as many “trigger points” as necessary in order to make it unique from all other data files that are processed by JetForm Central.
Example 1: Let’s say that you are wanting to process Accounts Payable checks through JetForm Central, but the data file that you can produce from your Line of Business application (e.g. Oracle Financials, SAP, Baan, Lawson, etc.) cannot add a job to the data file or it is too inconvenient or costly to do this. What you need to do is carefully look at the data file and determine the trigger points. Here are the first few records from an A/P Check file. Note that there is no fixed strings of data like “A/P Check” or “Check Number:” in the data file. There is however always a “-“ (dash) in Row 7, Column 6, another dash in Row 7, column 10 and a “.” (decimal) in Row 9, Column 77. You want to assign a job card of “^JOB APCHECK –afxon –zAPPRINTER”. The entry in the JetTrac JobCard.ini file would be:
7|6|-|7|10|-|9|77|.|“^JOB APCHECK –afxon –zAPPRINTER

08-MAY-97 LEARNING INTERNATIONAL 103080
12070-1 14-APR-97 0.00 8,241.35

0.00 8,241.35

You can have as many “Trigger Points” as you want in any one line. You can have up to 100 records in the INI file. You can read up to 100 lines into each data file to find data.
Processing filenames to determine
Example 2: Let’s say that nothing in the data file can be used

Configuring the JFNOJOB task:

See Section 3 for how JetForm Central will trigger JetTrac JobCard™. When it does, it will run the JetTrac JobCard Task Definition.
JetTrac JobCard will take in four files in the command line arguments:
<input file> <output file> <ini file> <log file>
The input file is the Print Image File created by the host application and copied to the JetForm Central Collector Directory. The output file is created by JetTrac JobCard and is exactly the same as the input file but with a job card pre-pended to the file. The file will be placed in the Collector Directory as specified by the JetForm Central Task definition. The INI file is the file with all the definitions as specified in Section 2.2. The log file is the JetForm Central logfile name.
The output file on the command line should be a path with \ and the first part of the desired file name. JetTrac JobCard™ will then tack on the date and a .DAT extension.
If the Task Definition had the parameter C:\jfsrvr\data\JCTOUT_
The output file name would then be something like:
C:\jfsrvr\data\JCTOUT_19990409072905.DAT
Where the part of the filename after the JCTOUT_ is the date and time which ensures that the filename is unique.
To add the JetTrac JobCard custom agent in JetForm Control for Windows platforms:
1. Start JetForm Control by clicking Start, Programs, JetForm Central, JetForm Control (may be slightly different for your installation). You will get the following screen:

2. Modify the JFNOJOB task by clicking on File, Job Management Database, Tasks. You will get the following screen:

3. Edit the JFNOJOB task by clicking on the task, then clicking Edit Task. Set up the Task Definition with the following information:

Task Id: JFNOJOB

Program name: java

Program options: -jar c:\jfsrvr\CustomAgents\JTJobCard\JTJobCard.jar @InFile c:\jfsrvr\data\ c:\jfsrvr\CustomAgents\JetTrac JobCard\JetTrac JobCard.ini @LogFileName

Comment: JetTrac JobCard Custom Agent
Notes:
a. The Task ID of JFNOJOB is installed when JetForm Central is installed. You will be modifying the Task Definition of this existing task.

b. The Program Name of jre is the Java program. This will be specified differently for each platform that JetTrac JobCard is installed on.

c. The Program Options are –cp (for Change Path of the Java Class), followed by the Java Class name, followed by the location of the JetForm Central Collector Directory (c:\jfsrvr\data in this example), followed by the fully qualified filename for the JetTrac JobCard INI file, followed by the fully qualified filename for the JetForm Central log file.
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. Close all windows, get back to the main JetForm Control screen and update the Job Management Database by clicking on Control, Reload Job Management DB.

RUNNING JETTRAC JOBCARD™:

Submitting transaction files to JetForm Central:

To submit a transaction file to JetForm Central, you place a data file into the Collector Directory. There are a number of ways to do this depending on the platform that you are running JetForm Central. You can FTP the file, use the JetForm Print Processor, use Named Pipes or simply copy the file.

How JetTrac JobCard™ is triggered:

JetForm Central scans the Collector Directory periodically for transaction files to process. When it finds a transaction file with the correct extension (.DAT by default), it will pick up the file and process it. The first thing it does is open the file and look at the first record for a job card. If it finds one, it processes the data file according to the instructions in the Job Management Database for that job. If it does not find a job card in the first record, it runs a JetForm Central Task called JFNOJOB. In the previous section, you configured the JFNOJOB task to run the JetTrac JobCard™ Custom Agent.

What JetTrac JobCard™ does:

When JetTrac JobCard™ runs, it reads in the transaction file that JetForm Central picked up. It opens up the INI filename specified in the Task Definition and processes each line in sequence, looking in the data file for matches. When it finds a match, it takes the Job Card specified in the last field in that line in the INI file and pre-pends that Job Card to the top of the transaction file. It assigns a filename based on the prefix specified in the Task Definition, then the date and time then a DAT extension. For example, if the prefix is JCTOUT_ and the file was processed on April 12 at 10:15:47 a.m., the filename would be JCTOUT_19990412101547.DAT

Error File:

If JetTrac JobCard™ does not find any match in the INI file, it will create a file with the same name as above but with a Job Name of JetTrac JobCardError with a number of fields that can be merged into an Error form and printed. This is to for a positive notification to the JetForm Central Administrator that the data file cannot be processed by JetForm Central as a job cannot be found for it. Here is a sample Error file:
^JOB JetTrac JobCardError

^field ProgName

JetTrac JobCard

^field Today

19990412192129

^field Message

No job card rules match for this file

^field InputFileName

APCHKNoMatch.dat

^field OutputFileName

JCT_19990412192129.dat

Log File:

JetTrac JobCard™ conforms to all JetForm requirements as a Custom Agent. It writes a status to the log file and creates the JETFORM.RSP. Here is a sample entry in the log file for a successful match:
19990411171144 JetTrac JobCard : Status 0, processing completed (^JOB APCHECKNoDetail -afxon -zAPPRINTER), 42 lines copied.
Here is a sample entry in the log file when there is no match:
19990411201434 JetTrac JobCard : Status 1, No job card rules match for this file