Sort Key

The field order print records need to be sorted in the right sequence in order for a document composition application to process them. The following is a description of the portion of each record that is responsible for performing this task.

Note that the first ten fields in the Sort Key - DISP_​GRP_​CD through FO_​ID - are all from the CIS database records. For each Field Order in an extract run, there will be a "block" of records of indeterminate size in which the values of these first ten fields will be identical. These ten fields see to it that each block is sorted correctly within the extract as a whole. It is the task of the last six fields to make certain that the records in a particular Field Order's block are sorted correctly within the block. Most of these six are artificial, but two are from the CIS database, where they serve a similar function.

The precise mechanics of the Sort Key may be difficult to envision. This is particularly true with regard to the three-in-one format of the Sequence Number field described in the table below. A look at the Order of Record Types section above may help to make it clearer. Within a given Field Order (FO) block there are several sub-groups. Not only must each sub-group as a whole be in the proper sequence within the FO block, but each record in a sub-group must be in the proper sequence within the sub-group. These sub-groups are Service Point (one or more per FO with one or more Field Activities at each SP), Meter (a Meter and its Registers), Multi-Item (a Multi-Item record and its Detail Lines), and Field Activity (a Field Activity record and its various Steps).

The following table defines the structure of the sort key that appears on each field order print record. Please note that different components are filled in for each printer key.

Field Name

Format

Source/Value/Description

DISP_​GRP_​CD

A8

CI_​FO / Dispatch Group code

REP_​CD

A8

CI_​FO / Representative code

STATE

A6

CI_​PREM / State of the Premise address

CITY

A30

CI_​PREM / City of the Premise address

POSTAL

A12

CI_​PREM / Postal Code of the Premise address

ADDRESS1

A64

CI_​PREM / first line of the Premise street address

PREM_​ID

A10

CI_​FO / System-assigned identifier for the Premise

SCHED_​DT

D10

CI_​FO / Scheduled date of the Field Order

SCHED_​TM

T15

CI_​FO / Scheduled time of the Field Order

FO_​ID

A10

CI_​FO_​STG_​DWN / System-assigned identifier of the Field Order

FO Group [Artificial]

N2

This field forces the Service Point record group(s) into a position subordinate to the Field Order. Values:

10 - Field Order

30 - SP

90 - End Field Order

SP Sequence [Artificial]

N2

If there is more than one Service Point on a particular FO, this field forces them into an arbitrary sequence. Each SP is then followed by its device and Field Activity record group(s).

SP Group [Artificial]

N2

This field forces the device (meter, item or multi-item) and Field Activity record groups into a position subordinate to the Service Point. Values:

10 - SP

20 - Item

30 - Meter

35 - End Meter

40 - Multi-Item

45 - End Multi-Item

50 - FA

60 - End SP

Sequence Number

READ_​SEQ

[Artificial]

[Artificial]

N3

This field serves the same purpose in three distinct areas:

Register Sequence (within a Meter record) (CI_​REG)

Item Sequence (within a Multi-Item record)

FA Sequence (within a Service Point)

In each instance, it forces the subordinate records into the correct order within, respectively, the Meter, Multi-item and Service Point record sub-groups.

STEP_​SEQ_​NBR

N3

CI_​FA_​STEP

In addition to the "natural" values from the CIS database, there are two artificial values that serve to force a particular record into its proper place within the FA sub-group:

000 - Credit & Collections record

999 - End FA record

FA Step Group [Artificial]

N2

Each FA Step will have one or more FA Step (action) records. This field is to force these records into an arbitrary sequence within the FA sub-group. Values:

10 - Enter Meter Badge Number

20 - Enter Item Badge Number

30 - Enter Customer Contact

40 - Enter Reconfigure Register

50 - Enter Disconnect Location

60 - Enter Register Reading

70 - Enter Multi-item

80 - Enter Trouble Order Statistics

90 - Enter Changes

98 - Generic (placeholder)

99 - End FA Step