You are here: Job and Form Set Rules Reference > JDT Rules Reference > SortBatches > Specifying Key fields

Specifying Key fields

Define the key fields for the sort in SortBatches control group. Any field defined in the RCB DFD file can be used as a sort field. Each batch can have its own sort fields defined. You can also define a default sort (“SortDefault)”. If you do not define a default sort, you must define a sort for each batch file written.

Here is the format of a SortBatches INI entry:

Batch Abbreviation = Field Name (A or D; Ascending or Descending)

Separate field references with semi-colons (;).

Here is an example:

< SortBatches >

SortDefault = ACCOUNT_NUMBER(A);COMPANY(A);FEAT_DESCR (A)

RegPrt = FEAT_DESCR(A);ACCOUNT_NUMBER(A)

In this example, the batch RegPrt will be sorted by CUSTOMER_NAME, FEAT_DESCR and ACCOUNT_NUMBER. All other batches will be sorted by COMPANY, FEAT_DESCR and ACCOUNT_NUMBER.