Saves the Interchange into an external file.
Syntax:
Parameters:
Returns
Returns 1 if the operation is successful; otherwise the operation returns zero.
Remarks
The data saved to the file begins with the Interchange Control Header and ends with the Interchange Control Trailer.
ASC/X12
- ISA - Interchange Control Header.
- IEA - Interchange Control Trailer.
UN/EDIFACT
- UNB - Interchange Header Service Segment.
- UNZ - Interchange Trailer Service Segment.
Example
Dim oEdiDoc As ediDocument
Dim oSchema As ediSchema
Dim oInterchange As ediInterchange
Dim sEdiFile As String
Dim sSefFile As String
Dim sOutput As StringsEdiFile = App.Path & "\850.X12"
sSefFile = App.Path & "\850.SEF"
sOutput = App.Path & "\Interchange.OUT"Set oEdiDoc = New ediDocument
Set oSchema = oEdiDoc.LoadSchema(sSefFile, 0)oEdiDoc.LoadEdi sEdiFile
' Get Interchange from document
Set oInterchange = oEdiDoc.FirstInterchange' Save interchange output
oInterchange.Save sOutput