Synchronization
About synchronization components
The following are descriptions of synchronization components.
Universal Trigger Program
Monitors the application physical file for changes, for example F4611, F4201, DCCLFA.
Trigger Results File
Contains the records that have changed in the application physical file.
Application Logical File
Shows the records selected from the Trigger Results file that match user-defined selection criteria.
SocketSync Server File
Retrieves the records from the application logical file and sends them to the TranConnect Synchronization Agent.
TranConnect Synchronization Agent
Receives the next available record from the SocketSync Server program and writes it to the corresponding database table, for example, F4611, F4201, F4311.
Note:In releases 004 and earlier, the synchronization process used the DCCSF file to store the records being synchronized. This file has been replaced by one Trigger Results file for each application data file being synchronized.
About synchronized records
Synchronized records are used during the process in directed applications.
During the data collection process, the following occurs:
-
At a specified time in a directed application, the device sends a download request to the Communication Agent on the data collection server (1).
-
The Communication Agent calls the Message Processor program (2), which retrieves the specified record from the applicable database table on the database server (3).
-
The Communication Agent sends the record to the device, completing the download request (4).
The following diagram shows the how synchronized records are used in directed applications:
About filtering records
Filtering records is the process of excluding records from those that you want to use at the device. For example, most application data files contain many records. Instead of downloading every record in a file, you can select only the records that your users need during the process. Your selection criteria can be based on a logical file, list value, or range of values.
Logical
A Logical can be either an exclusive or inclusive statement. It specifies that the SocketSync Server job uses an existing logical file as criteria for selecting records. For example, if you have a logical file attached to the F4611 file, you enter the name of the logical file, which might be F4611L2.
List
A List is an exclusive statement because it selects only the records that match the selection criteria. Lists specify that the SocketSync Server job uses specific values as its criteria for selecting records. For example, if you want to select all records that have a status of 2, you would enter 2 as the list value. You can also select records based on more than one value. In this case, you would enter 2,3 to select records that have a status of 2 or 3. You can have multiple instances of a List or Range in a selection criteria set. The multiple instances create OR conditions.
Range
Specifies that the SocketSync Server job uses a range of values as its criteria for selecting records. For example, if you want to select records that have a status between 2 and 5, you would enter 2,5 as the range values. You can have multiple instances of a List or Range in a selection criteria set. The multiple instances create OR conditions.
You must use a logical file for selection criteria that uses complex logic. For example, you want to select only records that have a branch/plant of 10, 20 or 30, a warehouse code of 1, and status of 340.
Filtering records specifies certain field values in the records and excludes all records that do not match the specified values. You can have multiple selection criteria on the same physical file, as illustrated in the following diagram.
About selection criteria
To define selection criteria, you must create header information and criteria details. You must use the Maintain Sync Selection Criteria form to define selection criteria. This form can be found in the MSC menu exit.
Header information
Header information helps the SocketSync Server job find the selection criteria. The following fields are found in the header.
-
Library
-
File
-
File Member
-
Selection Name
-
Description
Criteria details
The criteria details contain the selection parameters that the SocketSync Server job uses to select records from the applicable files. For a full update, the program selects records directly from the application data file. For a normal update, the program selects records from the Trigger Results file. You can determine the selection parameters and selection priority.
Selection parameters consist of fields and values (operands). Selection priority is the order in which the program matches the selection criteria to the record. For example, suppose you want to select records for a specific branch or plant, warehouse code, or status. You use sequence numbers to prioritize the selection criteria. The criteria details for this example would contain the following information.
First selection parameter - Sequence number 1.00
-
Sequence number: 1.00
-
Field: R2MCU
-
Action: LIST
-
Operands: 10
Second selection parameter - Sequence number 2.00
-
Sequence number: 2.00
-
Field: R2TYFL
-
Action: LIST
-
Operands: 1
Third selection parameter - Sequence number 3.00
-
Sequence number: 3.00
-
Field: R2PSTB
-
Action: LIST
-
Operands: 340
The program first looks for records with a branch or plant of 10, then a warehouse code of 1, and finally a status of 340. The program only selects the records that match the criteria.
You can build the selection criteria based on an existing logical file. In this case, you do not enter a value in the Field column, but do in the Seq Number, Action, and Operands columns. The criteria details for this example would include the following information.
-
Sequence number: 1.00
-
Action: LOGICAL
-
Operands: F611510
The program only selects the records that match the criteria.
You can also build the criteria based on a range of values. For example, suppose you want to select records for branch/plants 10, 20, 30, warehouse code of 1, or status of 340. The criteria details for this example would contain the following information.
First selection parameter - Sequence number 1.00
-
Sequence number: 1.00
-
Field: R2MCU
-
Action: LIST
-
Operands: 10,20,30
First selection parameter - Sequence number 2.00
-
Sequence number: 2.00
-
Field: R2TYFL
-
Action: LIST
-
Operands: 1
First selection parameter - Sequence number 3.00
-
Sequence number: 3.00
-
Field: R2PSTB
-
Action: LIST
-
Operands: 340
The program selects records with a branch or plant of 10, 20, or 30, a warehouse code of 1, or a status of 340.
The TranConnect Synchronization Agent downloads all filtered records of an application data file to its corresponding database table. This database table can be either a Microsoft SQL or Access database.
Before synchronizing records, you must create the database table. You use Application Studio to designate which records are used in an application.
Define selection criteria
Defining selection criteria is the process of creating header information and criteria detail. You use the Maintain Sync Selection Criteria form, which is accessed through the MSC menu exit.
Before you can define selection criteria, you must activate an event trigger on the physical file. You activate triggers by adding, changing, or deleting a record in its corresponding physical file.
To define selection criteria, complete the following steps.
-
On the TranConnect Master Menu selection line, enter MSC and select OK or press Enter.Expected ResultResult: The Work With Sync Selection Criteria form displays.
-
Press F6 to create a new set of selection criteria.Expected ResultResult: The Maintain Sync Selection Criteria form displays.
-
For Library, enter the name of the library in which the file resides.
-
For File, enter the name of the physical file to which the selection criteria applies.
-
For File Member, enter the member name of the file.
-
For Selection ID, enter the name of the selection criteria set.
-
For Selection Criteria Text, enter a description (up to 32 characters) that helps identify the selection criteria set and press Enter.Expected ResultResult: The Work with Sync Selection Criteria form displays and contains the selection set you defined.
-
For O (Option), enter 2 and select OK or press Enter.Expected ResultResult: The Maintain Sync Selection Criteria form displays.
-
Press F13 to specify selection criteria.Expected ResultResult: The Work with Sync Selection Criteria Detail form displays.
-
Press F6 to define the selection criteria field and its value.
-
For Sequence Number, enter the sequence number of the field that the SocketSync Server job will use to select records.
-
For Selection Field, complete one of the following options.Step InformationNote:If you are going to use 'Logical' as the Selection Action option, you can skip this step.
-
Enter the field that will be used as the selection criteria. Go to step 13.
-
Press F1, select a field and press Enter.
-
-
For Selection Action field, enter one of the following options.
-
Logical
Step InformationNote:The SocketSync Server job uses an existing logical file. You assign the logical file in the Selection Operands field.-
List
Step InformationNote:The SocketSync Server job uses the specified values of the Selection Operands field as the selection criteria. The field must contain the values of the Selection Operands fields to be selected. Use commas to separate field values.-
Range
Step InformationNote:The SocketSync Server job uses the specified range of values of the Selection Operands field as the selection criteria. The field must contain the value within the range specified in Selection Operands field to be selected. Use commas to separate field values.Step InformationNote:You must use a logical file for selection criteria that uses complex logic. For example, you want to select only records that have a branch/plant of 10, 20, or 30, a warehouse code of 1, and a status of 340. -
-
For Selection Operands, enter the valid values of the field you specified in step 12 and press Enter.Step InformationNote:
-
Do not use single or double quotation marks in this field.
-
Use commas to separate two or more values in a range list.
-
-
Do one of the following.
-
To add other fields, repeat steps 10 and 11 until all fields are defined.
-
Press F12 to return to the Maintain Sync Selection form.
-
-
Press F10 to generate the logical file that will be used as the selection criteria.Step InformationNote:Each time you change the selection criteria you must regenerate the logical file. The logical files are assigned a sequence number that increments with each generation. Periodically, you should delete the unused logical files using standard AS/400 maintenance functions. When the process completes, one of the following conditions occur:
-
If the process succeeds, the Work with Sync Selection Criteria form appears.
-
If the process fails, the text in the Generated Logical File and Gen'd Trigger Results LF fields is *GenFailed.
Expected ResultResult:-
If the process succeeds, the Work with Sync Selection Criteria form displays.
-
If the process fails, *GenFailed text displays in the Generated Logical File and Gen'd Trigger Results LF fields.
-
-
Complete one of the following options.
-
If the process succeeds, verify the new logical files were generated.
-
If the process fails, review the selection criteria
-
-
Repeat steps 2 through 17 for each physical file for which you want to create selection criteria.
-
Press F3 to exit the Work with Sync Selection Criteria form.
Change selection criteria
After you have generated the logical files of selection criteria, you can change only the description and selection criteria details.
To change selection criteria, complete the following steps.
-
At the TranConnect Master menu, on the menu selection line, enter MSC and select OK or press Enter.Expected ResultResult: The Work with Sync Selection Criteria form displays.
-
For O (Option), enter 2 and select OK or press Enter.Expected ResultResult: The Maintain Sync Selection Criteria form displays. The only information that you can change on this form is the description in the Selection Criteria Text field.
-
Highlight the text you want to change and enter the replacement text to change the description.Step InformationNote:If you are only changing the description, you do not need to regenerate the logical files. Go to step 7.
-
Press F13 to open the Work with Sync Selection Criteria Detail form and change selection criteria.
-
Press F6 to define the new criteria field and its values.
-
For Option, enter 2 and press Enter to change criteria.
-
Make the necessary changes to the criteria and press Enter.
-
-
Press F12 to return to the Maintain Sync Selection Criteria form.
-
Press F10 to generate the logical files to be used as the selection criteria.Step InformationNote:Each time you change the selection criteria you must regenerate the logical files. The logical files are assigned a sequence number that increments with each generation. Periodically, you should delete the unused logical files, using standard AS/400 maintenance functions.Expected ResultResult: When the process completes, one of the following conditions occur.
-
If the process is successful, the Work with Sync Selection Criteria form displays.
-
If the process failed, the text in the Generated Logical File and Gen'd Trigger Results LF fields is GenFailed.
-
-
Select the file with which you are currently working and review the status on the Maintain Sync Selection Criteria form to verify the new logical files were generated.Step InformationNote:
-
The value in the Generated Logical File field is the name of the logical file used for full updates, for example, F4611510.
-
The value in the Gen'd Trigger Results LF field is the name of the logical file used for normal updates, for example F$4611510.
-
If the process fails, review the selection criteria. Use the F13 option and review each line of selection criteria detail. Change the required values and generate the logical file. (Repeat steps 5 through 6).
-
-
Press F3 to exit the Maintain Selection Criteria form.Expected ResultResult: The TranConnect Master Menu displays.
Postrequisite: After changing selection criteria, you must regenerate the logical files.
Start the synchronization process
The following procedures use the default names given to programs, subsystems, libraries, objects, and files.
Prerequisite: Prior to syncing, ensure the subsystem is running. The SocketSync Server job waits in the job queue until the subsystem starts.
To start the synchronization process, complete the following steps.
-
On the command line, enter STRSYNCSVR and press F4.Step InformationResult: The Start a SocketSync form displays.
-
For SocketSync Server Job Name, enter the job name for the SocketSync Server job. For example, SYNCSVR.
-
Verify the default values of the following fields, and make updates as necessary.
-
IP Port Number
-
SocketSync Server Program Library
-
Job Description
-
Job Description Library
-
Job Queue
-
Job Queue Library
-
-
When you are finished, close the forms and press ENTER.
Loading...
There was a problem loading this topic