Online Help TEDIFile

Unit JclEDI_ANSIX12, JclEDI_UNEDIFACT

Types

TEDIFile

   The TEDIFile object contains and manages TEDIInterchangeControl objects.

 In JclEDI_ANSIX12.pas: Type and Property

TEDIFileOptions = set of (foVariableDelimiterDetection, foUseAltDelimiterDetection,
  foRemoveCrLf, foRemoveCr, foRemoveLf, foIgnoreGarbageAtEndOfFile);
property Options: TEDIFileOptions read FEDIFileOptions write FEDIFileOptions;

   The TEDIFileOptions flags change how TEDIFile parses EDI files.

  • foVariableDelimiterDetection - When this flag is set the TEDIFile object will attempt to automatically detect the delimiters used when parsing interchanges.
  • foUseAltDelimiterDetection - When this flag is set it allows the TEDIFile object to parse customized interchange control header segments. This flag is used with the [foVariableDelimiterDetection] flag.
  • foRemoveCrLf - When this flag is set the TEDIFile object will remove carrage-return line-feed pairs.
  • foRemoveCr - When this flag is set the TEDIFile object will remove carrage-return characters.
  • foRemoveLf - When this flag is set the TEDIFile object will remove line-feed characters.
  • foIgnoreGarbageAtEndOfFile - When this flag is set the TEDIFile object will ignore garbage characters at the end of an EDI file. It was reported that EDI files coming from UNIX systems were appending bogus character data.

 Type and Property

procedure InternalDelimitersDetection(StartPos: Integer); virtual;
procedure InternalAlternateDelimitersDetection(StartPos: Integer);

   These two procedures are used to determine the delimiters begin used when the TEDIFile object is parsing interchanges. See Variable delimiter detection for more information.

 Function

function Assemble: string; override;

   This function implements the assembling of EDI data into EDI file format.

 Procedure

procedure Disassemble; override;

   This procedure implements the disassembling of EDI data from EDI file format.

 Function

function InternalCreateInterchangeControl: TEDIInterchangeControl; virtual;

   InternalCreateInterchangeControl will create a TEDIInterchangeControl object and is used by InternalCreateEDIDataObject.

 Function

function InternalAssignDelimiters: TEDIDelimiters; override;

   Returns a TEDIDelimiters object with default settings. If a TEDIDelimiters object was not assigned to the EDI file prior to calling the disassemble procedure then a default delimiters object will be created.

 Function

function InternalCreateEDIDataObject: TEDIDataObject; override;

   This function calls InternalCreateInterchangeControl.

 Procedures and Property

procedure LoadFromFile(const FileName: string);
procedure ReLoadFromFile;
procedure SaveToFile;
procedure SaveAsToFile(const FileName: string);
property FileName: string read FFileName write FFileName;

   File management procedures. The TEDIFile object buffers the entire EDI file in memory since they are usually small.

 Functions and Procedures

function AddInterchange: Integer;
function AppendInterchange(Interchange: TEDIInterchangeControl): Integer;
function InsertInterchange(InsertIndex: Integer): Integer; overload;
function InsertInterchange(InsertIndex: Integer;
  Interchange: TEDIInterchangeControl): Integer; overload;
procedure DeleteInterchange(Index: Integer); overload;
procedure DeleteInterchange(Interchange: TEDIInterchangeControl); overload;
function AddInterchanges(Count: Integer): Integer;
function AppendInterchanges(
  InterchangeControlArray: TEDIInterchangeControlArray): Integer;
function InsertInterchanges(InsertIndex, Count: Integer): Integer; overload;
function InsertInterchanges(InsertIndex: Integer;
  InterchangeControlArray: TEDIInterchangeControlArray): Integer; overload;
procedure DeleteInterchanges; overload;
procedure DeleteInterchanges(Index, Count: Integer); overload;

   Interchange control item management functions and procedures.

 Property

property Interchange[Index: Integer]: TEDIInterchangeControl read GetInterchangeControl
  write SetInterchangeControl; default;

   This property allows direct and easy access to the TEDIInterchangeControl objects managed by the object list in TEDIFile.

 Property

property Interchanges: TEDIDataObjectList read FEDIDataObjects;

   A property that exposes the object list in TEDIFile.

 Property

property InterchangeControlCount: Integer read GetCount;

   The count of interchanges in the EDI file.

Usage

Notes & Examples

< Under Construction >