Now opening: online payments go live shortly. Email [email protected] and we'll take your request first.
Over The Road SIOTRSI

997 AK5*R*3: ST02 and SE02 control numbers don't match

Every transaction set starts with ST and ends with SE, and both carry the same control number. If the two values differ, even only by leading zeros, the partner rejects the set.

What you see

AK1*QM*418~
AK2*214*0002~
AK5*R*3~
AK9*R*1*1*0~

A close cousin is AK5*R*23: Transaction Set Control Number Not Unique within the Functional Group, which you get when two STs in the same GS use the same number.

What it means

AK502 code 3 (element 718) = Transaction Set Control Number in Header and Trailer Do Not Match. ST02 and SE02 are element 329, a 4-to-9 character string. They're compared character for character, so 0002 and 2 do not match.

Why it happens

The exact fix

  1. Make SE02 an exact copy of ST02 for each transaction set, with the same digits and the same padding.
  2. Give every ST in the same GS group its own number (0001, 0002, 0003...).
  3. Resend with a new ISA13 interchange control number.

Before and after

Rejected
ST*214*0002~
B10*PRO88232*5523902*TRKX~
LX*1~
AT7*X3*NS***20261021*0815*CT~
MS1*MOBILE*AL*US~
SE*6*0001~
Accepted
ST*214*0002~
B10*PRO88232*5523902*TRKX~
LX*1~
AT7*X3*NS***20261021*0815*CT~
MS1*MOBILE*AL*US~
SE*6*0002~

Stop it happening again

Not sure this is your error?

Paste your 997, TA1, rejected file, or the broker's error email into the free EDI Reject Checker. It decodes every AK3/AK4/AK5/AK9 and TA1 code and checks counts, control numbers, and dates in seconds. It runs in your browser, so nothing is uploaded.

Fix reports are paid up front; if we can't find the cause, the refund is automatic.

References