You are here: Job and Form Set Rules Reference > JDT Rules Reference > GetCo

GetCo

Use this form set level rule to get the company code (Key1 field) from the extract data, and get its equivalent value from the INI file for use by the system.

Syntax

;GetCo;;;

This rule gets the company code (Key1 field) from the extract data using the GetRecord search criteria specified in the data field. This rule also sets the company—stored in the master transaction set—to the value defined in the INI file. In the INI file, this value is stored in the Key1Table control group under the option name which equals the value returned by GetRecord.

Example

;GetCo;;17,PMSP0200 125,3;

In this example, the system searches the extract data for the first record that meets the GetRecord search criteria of having PMSP0200 at offset 17. From this record, the system extracts three characters at position 125, and uses those characters to look up the company in the INI file. It is this equivalent value from the INI file that should be used in files such as the form set definition file, as well as the set recipient table file. For example, if the three characters at position 125 were ABC, the associated line in the Key1Table control group would look something like:

< Key1Table >

ABC = THE ABC FRUIT COMPANY

See also