Document Table

The Document Table (Document_tb) contains a record for every document in the Sterling Gentran:Server® system.

The translator creates a record in the Document Table each time a document is created or introduced to the system. Each time a function is performed against a document (such as send, receive, import, or export), the translator updates the corresponding record in the Document Table. The translator deletes a record from the Document Table when the corresponding document is deleted.

Table 1. Document Table field information
Field Name Type Size Values and Use
DocumentKEY number (long) 4 Unique identifier (integer) for a document that is allocated by the system.
Direction number (integer) 2 Direction of the document:
  • 0 = Inbound
  • 1 = Outbound
PartnerKEY string 25 Unique identifier for the partner to which the document belongs.
DocumentName string 255 Name of the document established in the Application Integration subsystem to help identify this document in the Sterling Gentran:Server document browsers.
TransactionSetID string 150 Transaction set (message) identifier established in the partner relationship or in the document.
FunctionalGroupID string 6 Functional group identifier established in the partner relationship.
ControlNumber string 255 Value from the partner relationship used to generate the next transaction set control number or message reference.
LocationStatus number (long) 4 Location of the document in Sterling Gentran:Server:
  • 0 = In Drawer
  • 1 = Out Drawer
  • 2 = In Documents
  • 3 = ?In Documents
  • 4 = Out Documents
  • 5 = ?Out Documents
  • 6 = Workspace
  • 7 = Queued
ComplianceStatus number (long) 4 Compliance status of the document in Sterling Gentran:Server:
  • 0 = Incomplete
  • 1 = NonCompliant
  • 2 = OK
  • 3 = DocQueued
  • 4 = Sent
  • 5 = NetReceived
  • 6 = NetDelivered
  • 7 = Ack'd
  • 8 = Waiting
  • 9 = OverDue
  • 10 = NetWarning
  • 11 = NetError
  • 12 = AckErr
  • 13 = FAPartial
  • 14 = FAReject
  • 15 = NetPickedUp
  • 16 = Duplicate
  • 17 = ReadyToSend
  • 18 = SendFailed
TimeCreated number (long) 4 Time the document was created by the system.
Release number (long) 4 Message release number of the document (TRADACOMS only).
TestMode number (long) 4 Indicates the partner relationship mode:
  • 0 = Production
  • 1 = Test
TestModeChar number (integer) 2 Character representation of the partner relationship mode:
  • 0 = Production
  • 1 = Test
Agency number (integer) 2 EDI standard used for the document.
InterchangeVersion string 13 Version of the interchange from the interchange control record in the partner relationship.
GroupVersion string 13 Version of the group from the group control record in the partner relationship.
DocumentVersion string 13 Version of the document from the document control record in the partner relationship.
DocumentBlobKEY string 255 Name of the *.doc file in the Documents subfolder.
UserIDKEY string 20 Identifier for the user who created the document.
ReferenceData string 255 Reference data for this document established in the Application Integration subsystem to help identify the document in the Sterling Gentran:Server document browsers.
TranslationReport File string 255 File name for the translator report.
AppField1 string 150 First application field in this document that was updated in the Application Integration subsystem.
AppField2 string 150 Second application field in this document that was updated in the Application Integration subsystem.
AppField3 string 40 Third application field in this document that was updated in the Application Integration subsystem.
AppField4 string 40 Fourth application field in this document that was updated in the Application Integration subsystem.
AppField5 string 40 Fifth application field in this document that was updated in the Application Integration subsystem.
AppField6 string 40 Sixth application field in this document that was updated in the Application Integration subsystem.
Element Separator number (integer) 2 Value from the partner relationship used to separate elements in a data segment.
SubElement Separator number (integer) 2 Value from the partner relationship used to separate component elements in a composite data element.
SegmentTerminator number (integer) 2 Value from the partner relationship used to identify the end of a data segment.
ReleaseCharacter number (integer) 2 Value from the partner relationship used to restore any character used as a syntactical separator to its original meaning.
SegmentTag number (integer) 2 Value from the partner relationship used to identify the end of each segment tag (identifier).
DecimalIndicator number (integer) 2 Value from the partner relationship used to indicate a decimal point in a numeric field.
Processing number (integer) 2 Indicates if a document is being processed:
  • 0 = Not processing
  • 1 = Processing
  • 2 = Deferred Acknowledgement
Restored number (integer) 2 Indicates whether the data is original or restored:
  • 0 = Original
  • 1 = Restored
NbrBytes number (long) 4 Provides a counter of the number of bytes in the document EDI data.
NbrRecords number (long) 4 Provides a counter of the number of records in the document EDI data.
Mailbox string 125 Mailbox that corresponds to the document.
RepeatingElement Separator number (integer) 2 Location of the repeating element separator in the interchange, if the standard you are using employs composite fields containing repeating data elements.