Framework EDI Reference. Methods and Properties
ediSchemas. DefineTransactionSetID

Re-identifies the ASC/X12 transaction set by specifying a new identifier code for the transaction set.

Syntax:

Parameters:

Controlling Agency:

Remarks 

The transaction set identifier code identifies the type of transaction set used to build a transaction set in a document. The transaction set must be defined in the schema with the identifier code that is to be used.

The following is a Visual Basic program that defines the Functional Acknowledgment from the default ID of "997" to "997B". It uses the Standard Exchange Format file that has the Functional Acknowledgment transaction set defined as:

The code is:

Dim oEdiDoc As Fredi.ediDocument
Dim oAck As Fredi.ediAcknowledgment
Dim oSchemas As Fredi.ediSchemas
Dim oSef As Fredi.ediSchema
Dim sSefFile As String
Dim sEdiFile As String

sSefFile = App.Path & "\850.sef"
sEdiFile = App.Path & "\850.x12"

Set oEdiDoc = New Fredi.ediDocument

Set oSchemas = oEdiDoc.GetSchemas
oSchemas.EnableStandardReference = False
oSchemas.DefineTransactionSetID(TransactionSet_X12_Functional_Acknowledgment) = "997B"

Set oSef = oEdiDoc.LoadSchema(sSefFile, 0)

Set oAck = oEdiDoc.GetAcknowledgment
oAck.EnableFunctionalAcknowledgment = True

oEdiDoc.LoadEdi sEdiFile

MsgBox "Done"