Non-ODBC transaction log table in log database

The translog.in and translog.out files contain transaction logging for non-ODBC databases, as shown in Table 3-7.

Table 3-7: Non-ODBC transaction log table in log database

Name

Type

Width

Description

RUN_ID

Number

Single

Runtime ID – loaded from internal run ID number that was passed in as a -id parameter. This run ID is also loaded once into the SYS_RUNID system variable, but the value of SYS_RUNID is not used for trlog. The run ID always numeric from initial parameter value.

TYP

Character

1

Type flag:

  • H – Header (ST)

  • T – Trailer (SE)

  • D – Detail (messages between ST and SE)

  • U – User Write Log command

RUN_DATE

Date

14

Runtime date – loaded from the SYS_DATE and SYS_HHMMSS system variables (SYS_DATE and SYS_HHMMSS are loaded from the system time.)

ACKBY_DATE

Date

14

Date by which an acknowledgement must be made

  • Inbound – Before each log write, if TYP is H, date is loaded from the INT_HEAD_DATE and INT_HEAD_TIME system variables, which are loaded from envelope.

    If TYP is not H, then null date.

  • Outbound – Before each log write, if TYP is H and an acknowledgment was requested, date is calculated from today’s date plus the value in the DAYS, HOURS, and MINUTES fields in the trade agreement database. If TYP is not H, then null date.

TRANS_CODE

Character

2

Transaction code – loaded from the SYS_TRCODE system variable.

  • Inbound – SYS_TRCODE loaded from envelope.

  • Outbound – SYS_TRCODE loaded from parameter.

TRANS_NAME

Character

6

Transaction name – loaded from the SYS_TRANS system variable, which is loaded from internal transaction code before each log write.

Message Type – MSH 00009

TPTNER_ID

Character

35

Code used to identify the trading partner

Loaded from the SYS_TRADNO system variable.

  • Inbound – TPTNER_ID is looked up in trading partner database based on lookup criteria and data in EDI envelope.

  • Outbound – TPTNER_ID is loaded from an application file.

VERSION

Character

12

Version of EDI standard used in the map

Loaded from the X12_VERSION system variable.

  • Inbound – X12_version loaded from envelope

  • Outbound – Loaded from trade agreement table

    • Version/Release/Industry Identifier Code – GS 08

    • Message Version Number – UNH S009 0052

    • Message Release Number – UNH S009 0054

ISA_TYPE

Character

5

EDI standard used by this trading partner in this transaction

  • Inbound – Loaded from the INT_VERSION system variable, which is loaded from the EDI envelope.

  • Outbound – Loaded from the ISA_TYPE system variable, which is loaded from trade agreement table

    • Interchange Control Version Number – ISA 12

    • Syntax Identifier – UNB S001 0001

    • Syntax Version Number – UNB S001 0002

INTERCHANG

Character

35

Interchange code – loaded from the INT_HEAD_NUM system variable

  • Inbound – Value taken from the EDI envelope.

  • Outbound – Loaded from the ISA control number taken from trading partner table and incremented.

    • Interchange Control Number – ISA 13

    • Interchange Control Count – UNB S004 0020

GROUP_NO

Character

35

Group number – loaded from the FUNC_GP_NUM system variable

  • Inbound – Value taken from EDI envelope.

  • Outbound – Loaded from GS control number taken from the trade agreement table and incremented

    • Functional Group Header Control Number – GS 06

    • Batch Control ID – BHS 00091

TRANS_NO

Character

35

Transaction number – loaded from the FUNC_ST_NUM system variable

  • Inbound – Value taken from EDI envelope.

  • Outbound – Loaded from 1000 * (GS control number taken) + transaction count.

APP_RCV_CD

Character

35

Code used to identify the group level receiver on outbound maps and sender on inbound maps. Loaded from the APP_RECV_CODE system variable.

  • Inbound – Loaded from EDI envelope.

  • Outbound – Loaded from Tradepartner.

    • Application Receiver Code – GS 03

    • Interchange Receiver Internal Sub-ID – UNB S003 0046

    • Receiving Facility – MSH 00006

    • File Receiving Facility – FHS 00072

    • Batch Receiving Facility – BHS 00086

APP_SND_CD

Character

35

Code used to identify the group level sender on outbound maps and receiver on inbound maps. Loaded from the APP_SEND_CODE system variable.

  • Inbound – Loaded from EDI envelope

  • Outbound – Loaded from tradepartner.

    • Application Sender Code – GS 02

    • Interchange Sender Internal Sub-ID – UNB S002 0042

    • Sending Facility – MSH 00004

    • File Sending Facility – FHS 00070

    • Batch Sending Facility – BHS 00084

RECV_CODE

Character

35

Code used to identify the interchange level receiver on outbound maps and sender on inbound maps. Loaded from the RECV_CODE system variable.

  • Inbound – Loaded from EDI envelope

  • Outbound – Loaded from tradepartner.

    • Interchange Receiver ID Code – ISA 08

    • Interchange Receiver ID – UNB S003 0010

    • Receiving Application – MSH 00005

    • File Receiving Application – FHS 00071

    • Batch Receiving Application – BHS 00085

SEND_CODE

Character

35

Code used to identify the interchange level sender on outbound maps and receiver on inbound maps. Loaded from the SEND_CODE system variable.

  • Inbound – Loaded from EDI envelope

  • Outbound – Loaded from tradepartner.

    • Interchange Sender ID Code – ISA 06

    • Interchange Sender ID – UNB S002 0004

    • Sending Application – MSH 00003

    • File Sending Application – FHS 00069

    • Batch Sending Application – BHS 00083

RECV_QUAL

Character

4

Qualifier that specifies the type of code used to identify the interchange level receiver on outbound maps and sender on inbound maps. Loaded from the RECV_QUAL system variable.

  • Inbound – Loaded from EDI envelope

  • Outbound – Loaded from tradepartner.

    • Interchange Receiver ID Qualifier – ISA 07

    • Interchange Receiver ID Code Qualifier –UNB S003 0007

SEND_QUAL

Character

4

Qualifier that specifies the type of code used to identify the interchange level sender on outbound maps and receiver on inbound maps. Loaded from the SEND_QUAL system variable.

  • Inbound – Loaded from EDI envelope

  • Outbound – Loaded from tradepartner.

    • Interchange Sender ID Qualifier – ISA 06

    • Interchange Sender ID Code Qualifier – UNB S002 0007

ERROR

Number

Single

Total errors – loaded from internal system count of errors between ST and SE.

The LOG_ERRS and TOT_ERRS system variables are loaded at same time. LOG_ERRS is the number of errors between ST and SE. TOT_ERRS is the total number of errors for the run.

STAT

Character

1

Status – loaded from internal count of total # errors.

The LOG_STATUS system variable is also loaded at time of write log.

  • W – SEG_ST, SEG_SE, User Write

  • T – Bad Tradepartner

  • S – Bad ISA, GS or ST

  • U – Stop Run

  • A – Abort Trans

  • F – Fatal Error

  • E – Other Error Message

BYTE-COUNT

Number

Single

Count of the number of bytes between ST and SE – is zero for every ST and increment until SE is written.

The LOG_SIZE system variable is loaded with the byte count at time of write log.

DIR

Character

3

Direction of map

  • Outbound – OUT

  • Inbound – IN, CMP, PRT

There is no system variable

FLOW_LEVEL

Character

5

Level of segment in flow

The LOG_LEVEL system variable is loaded at time of write log.

RECORD_NAM

Character

10

Record name – the LOG_RECNAME system variable is loaded at time of write log. Can be assigned by user in write log.

If:

  • Mapping is in progress and the field being mapped to or from is a record field, then this record name value is used.

  • Error occurs during a rule, then code attempts to identify the record name involved.

  • The field involved is a memory variable or a string variable, then the memory variable or string variable is written to the log field RECORD_NAM.

  • No record is associated with the error, then this field will be blank. This field cannot be written to by the user assigning a value to the system variable.

RECORD_NO

Character

6

Record number – the LOG_READ_CNT system variable can be assigned by user in write log command. Otherwise the system variable and log are loaded and written at the same time.

  • Inbound – The line number being processed in the incoming EDI file.

  • Outbound – Contains the count that this record type has been read if the error message involves a record. If not, it will be zero.

FIELD_NAME

Character

15

Field Name – the LOG_FIELDNAME system variable can be assigned by user in write log command. Otherwise the LOG_FIELDNAME and FIELD_NAME log field are loaded at the same time of write log.

If:

  • Mapping is in progress and the field being mapped to or from is a record field, then this field name value is used.

  • Error occurs during a rule, then code attempts to identify the field name involved.

This field cannot be written to by the user directly assigning a value to the system variable.

SEGMENT

Character

3

Segment – can be assigned by user in write log command.

  • Inbound – Current segment name LOG_SEG

  • Outbound – Will have a value on write logs for SEG_ST and SEG_SE types and for errors that occur during direct mapping to EDI file.

SEG_COUNT

Number

Long Integer

Segment count – can be assigned by user in write log command.

Count of segments between ST and SE inclusive.

The SEGMENT_COUNT system variable loaded every time segment is written/read from EDI File.

ELEMENT

Character

2

Element – can be assigned by user in write log command.

The LOG_ELEM system variable

SUBELEM

Character

2

Sub-element – can be assigned by user in write log command.

The LOG_SUBELEM system variable

SEV_CODE

Character

2

Severity code – can be assigned by user in write log command.

For all system error messages this code is a 1.

For other system non-error messages this code is 0.

MSG_NO

Character

5

Message number – can be assigned by user in write log command.

The LOG_MSG_NO system variable

MSG_TEXT

Character

100

Message text – can be assigned by user in write log command.

The LOG_MSG system variable

FILENAME

Character

160

For ST segments:

  • Outbound – FILENAME contains the current EDI outbound file name (can change based on tradstat and tp mailbox entries). Filename is not available as the system variable.

  • Inbound – The inbound EDI file name (always the same). Filename is not available as the system variable.

For SE segments and inbound transactions:

FILENAME

  • Contains the current file name of any EDI OUT file names (can change based on tradstat, tp mailboxes and tradstat EDI OUT field)

  • Consists of both complete path and Filename.

  • Is available as the EDI_OUT_FILENAME system variable.

FIELDVAL

Character

30

Field value – the LOG_VALUE system variable.

Can be assigned by user in write log command. Otherwise the system variable and log field value are loaded at time of write to the log. If this is an error message, the value of the field code attempts to load the value of the record field, memory variable, or string constant in error.

USER_IDENT

Character

35

User-defined field – the SYS_USER_FIELD system variable.

Log field is loaded from system variable.

RTP does not assign values to SYS_USER_FIELD.

ACK_EXPECT

Character

1

Flag that specifies whether a TA1 interchange-level acknowledgement is expected, only on outbound maps:

  • 1 – TA1 acknowledgement requested

  • 0 – TA1 acknowledgement not requested the ACK_REQSTD system variable.

Inbound – Loaded from EDI Envelope (ISA element 14).

TR_ACK_TYP

Character

1

Flag that specifies whether a group-level functional acknowledgement is expected, only on outbound maps:

  • 1 – functional acknowledgement requested

  • 0 – functional acknowledgement not requested

The corresponding system variable is TR_ACK.

Outbound – Loaded from tradstat table

T_P_IND

Character

1

Test/Production Indicator

  • T – T Test

  • P – Production

  • I – Information

  • D – Debug

  • 1–9

  • Null

The TEST_IND system variable

Inbound – Loaded from EDI envelope

Outbound – Loaded from Tradstat.

TRANS_CNT

Number

Long Integer

Transaction count

No system variable.

Outbound – Log value is loaded from an internal count of the number of ST–SE transactions read or written between SEG_GS and SEG_GE.

FILEOFFSET

Number

Single

Number of Bytes File Offset

No system variable. Written from internal count of number of bytes read (inbound) or number of bytes written to the EDI file.

RCOUNT

Number

Integer

Field for Record Manipulation

Always set equal to 1 before log write.

SNDR_ROUTE

Character

14

(35 for Syntax 4)

Internal code used to identify the interchange level sender on outbound maps and receiver on inbound maps.

Interchange Sender Internal ID – UNB S002 0008

SNDR_SUBID

Character

35

Internal sub-code used to identify the interchange level sender on outbound maps and receiver on inbound maps.

Interchange Sender Internal Sub-ID – UNB S002 0042 (EDIFACT Syntax 4 only)

RCVR_ROUTE

Character

14

(35 for Syntax 4)

Internal code used to identify the interchange level receiver on outbound maps and sender on inbound maps.

Interchange Receiver Internal ID – UNB S003 0014

RCVR_SUBID

Character

35

Internal sub-code used to identify the interchange level receiver on outbound maps and sender on inbound maps.

Interchange Receiver Internal Sub-ID – UNB S003 0046 (EDIFACT Syntax 4 only)

APPL_REF

Character

14

Name of the application messages contained in the EDIFACT UNB envelope.

Application Reference – UNB S005 0026

PROC_PRIOR

Character

1

Processing Priority Code – UNB S005 0029

COMM_AGM

Character

35

Interchange Agreement Identifier – UNB S005 0032

APP_SND_QL

Character

4

Qualifier that specifies the type of code used to identify the trading partner at the group level – as the sender on outbound maps and as the receiver on inbound maps.

Application Sender ID/ID Code Qualifier – UNG S006 0007

APP_RCV_QL

Character

4

Qualifier that specifies the type of code used to identify the trading partner at the group level – as the receiver on outbound maps and as the sender on inbound maps.

Application Receiver ID/ID Code Qualifier – UNG S007 0007

ASSOC_CODE

Character

6

Association Assigned Code –

  • UNG S008 0057

  • UNH S009 0057

APP_PSWD

Character

14

Application Password – UNG S008 0058

CLIST_VER

Character

6

Code List Directory Version Number – UNH S009 0110 (EDIFACT Syntax 4 only)

MSG_TYPE

Character

6

Message Type Sub-Function Identifier – UNH S009 0113 (EDIFACT Syntax 4 only)