EDIFACTReader Control

Properties   Methods   Events   Config Settings   Errors  

The EDIFACTReader control efficiently parses complete EDIFACT transmissions, providing a convenient way to extract and explore data from all included messages.

Syntax

EDIFACTReader

Remarks

The control allows you to parse an incoming EDI document. To parse a document, first, use LoadSchema to load a schema file into the control. Next, select the document you want to process by setting InputFile or InputData and calling Parse.

As the control processes the document, its events will fire and the contents of the document will be available in the Interchange, FunctionalGroup, Message, Segment, Element, and Component properties. The corresponding *Index properties can be thought of as a path within the document. For example, setting the MessageIndex property will cause the SegmentCount property to be updated with the number of segments within the selected message, and then the SegmentIndex property can be used to select one of the segments within that message.

To manage the amount of memory used during processing, the BuildDOM property can be used to select how much of the message will be available in the properties at once:

  • bdEntireDocument - The entire document will be available at once.
  • bdInterchange - Only the current interchange and its contents will be available.
  • bdMessage - Only the current message will be available.
  • bdNone - Only the current segment and its elements will be available.

During parsing, the control performs basic validation of the incoming document. If an error is encountered, the ValidateWarning event will fire.

Property List


The following is the full list of the properties of the control with short descriptions. Click on the links for further details.

AckTypeSpecifies the type of ACK that will be generated by GenerateAck .
BuildDOMControls how much of the document will be stored during parsing.
ComponentDataTypeThe type of data contained in the element.
ComponentIsCompositeSpecifies whether the element is a simple or composite element.
ComponentMaxLenFor a simple element, this specifies the maximum length of the element according to the schema.
ComponentMinLenFor a simple element, this specifies the minimum length of the element according to the schema.
ComponentSchemaDescThe description of the element as specified in the schema.
ComponentSchemaNameThe name of the element as specified in the schema.
ComponentValueIf the element is a simple element, this property contains its value.
ComponentCountThe number of controls in the current Element.
ComponentIndexThe index of the current Control.
DelimiterComponentThe character used to separate the controls in a composite element.
DelimiterDecimalThe character used to separate the integer portion of a numeric value from the fractional portion.
DelimiterElementThe delimiter used to separate elements within a segment.
DelimiterReleaseThe character used to escape other characters within a property.
DelimiterRepetitionThe character used to indicate a repeating element or control.
DelimiterSegmentThe character used to terminate a segment.
ElementDataTypeThe type of data contained in the element.
ElementIsCompositeSpecifies whether the element is a simple or composite element.
ElementMaxLenFor a simple element, this specifies the maximum length of the element according to the schema.
ElementMinLenFor a simple element, this specifies the minimum length of the element according to the schema.
ElementSchemaDescThe description of the element as specified in the schema.
ElementSchemaNameThe name of the element as specified in the schema.
ElementValueIf the element is a simple element, this property contains its value.
ElementCountThe number of elements in the current Segment.
ElementIndexThe index of the current Element.
FGroupAppPasswordThe application password as specified in the functional group header.
FGroupAppRecipientIdentificationThe name or code of the intended recipient of the message group.
FGroupAppRecipientIDQualifierThe qualifier for the recipient's identification (if it contains a code value).
FGroupAppSenderIdentificationThe name or code of the message group's sender.
FGroupAppSenderIDQualifierThe qualifier for the sender's identification (if it contains a code value).
FGroupAssociationAssignedCodeThe assigned code for the message type.
FGroupControllingAgencyA code value that indicates the agency responsible for maintaining the message specifications.
FGroupDateThe date that the group of messages was prepared.
FGroupGroupIdentificationThe identification value for the functional group.
FGroupMessageReleaseThe message release number for the message type appearing in the message group.
FGroupMessageVersionThe message version number for message type appearing in the functional group.
FGroupReferenceNumberThe reference number for the functional group.
FGroupTimeThe time that the group of messages was prepared.
FunctionalGroupCountThe number of FunctionalGroups in the current Interchange.
FunctionalGroupIndexThe index of the current FunctionalGroup.
GroupSpecifies the group to load segments from.
InputDataThe EDI message, specified as a string.
InputFileThe file containing the EDI message.
InterchangeAckRequestIf this property is '1', an ACK was requested in response to this interchange.
InterchangeAgreementIdentifierThe identifier for the communication agreement used by the interchange.
InterchangeApplicationReferenceIf the interchange contains only one type of message, this can contain the identifier for the type of message.
InterchangeCharacterEncodingThe character encoding used by the interchange.
InterchangeCodeListVersionNumberThe identifier for the communication agreement used by the interchange.
InterchangeDateThe date that the interchange was prepared.
InterchangeProcessingPriorityCodeA 1-character code that requests a specific processing priority for the interchange.
InterchangeRecipientIdentificationThe identification for the interchange's recipient.
InterchangeRecipientIDQualifierThe qualifier for the recipient identification code.
InterchangeRecipientInternalIdentificationMore specific recipient identification for internal use.
InterchangeRecipientInternalSubIdentificationA sub-identification string for the receiver for internal use.
InterchangeRecipientPasswordA password to be verified by the recipient, such as a system or network password.
InterchangeRecipientPasswordQualifierA qualifier for the recipient password.
InterchangeReferenceNumberA reference number for the interchange.
InterchangeSenderIdentificationThe identification for the interchange's sender.
InterchangeSenderIDQualifierThe qualifier for the sender identification code.
InterchangeSenderInternalIdentificationMore specific sender identification for internal use.
InterchangeSenderInternalSubIdentificationA sub-identification string for the sender for internal use.
InterchangeSyntaxIdentifierA identifier specifying the controlling agency and valid character set.
InterchangeSyntaxVersionNumberA 1-character numeric value indicating the syntax version.
InterchangeTestIndicatorIf this property is '1', the interchange is a test interchange.
InterchangeTimeThe time that the interchange was prepared.
InterchangeCountThe number of Interchanges in the document.
InterchangeIndexThe index of the current Interchange.
MsgAssociationAssignedCodeA code assigned to the message by the controlling organization.
MsgCodeListVersionNumberThe version number of the code list that should be used.
MsgCommonAccessReferenceA reference value to associate this message with related messages.
MsgControllingAgencyA code that identifies the controlling agency for this message type.
MsgFirstAndLastTransferA single-character property that indicates the first and last messages in a related set.
MsgMessageImplControllingAgencyA code value that identifies the controlling agency for the message implementation.
MsgMessageImplIdentificationIdentifies the message implementation.
MsgMessageImplReleaseIdentifies the release number for the message implementation.
MsgMessageImplVersionIdentifies the version number for the message implementation.
MsgMessageReleaseIdentifies the release number for the message.
MsgMessageSubsetControllingAgencyA code value that identifies the controlling agency for the message subset.
MsgMessageSubsetIdentificationIdentifies the message subset.
MsgMessageSubsetReleaseIdentifies the release number for the message subset.
MsgMessageSubsetVersionIdentifies the version number for the message subset.
MsgMessageTypeA code identifying the message's type.
MsgMessageTypeSubFunctionIdentificationA code identifying the sub-function of the message's type.
MsgMessageVersionIdentifies the version number for the message.
MsgReferenceNumberA unique reference number for the message.
MsgScenarioControllingAgencyIdentifies the controlling agency for the message scenario.
MsgScenarioIdentificationThe identifier for the message scenario.
MsgScenarioReleaseThe message scenario's release number.
MsgScenarioVersionThe message scenario's version number.
MsgSequenceOfTransfersSpecifies the message's position in a sequence.
MessageCountThe number of message in the current Interchange or FunctionalGroup.
MessageIndexThe index of the current Message.
SegmentOptionalSpecifies whether the segment is required or optional.
SegmentPathContains the path to the segment, including the groups that the segment is contained in.
SegmentSchemaPathContains a numeric representation of the path to the segment, using the indexes within the schema, such as \\4[3]\\5[6]\\7[8] .
SegmentTagThe tag of the segment, such as BGM , DTM , FTX , etc.
SegmentCountThe number of segments in the current Message.
SegmentIndexThe index of the current segment.
ValidateOnParseWhen True , the control will validate any documents it parses.

Method List


The following is the full list of the methods of the control with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting.
GenerateAckGenerates an ACK in response to the most recently parsed message.
GetElementValueReturns the value of the element or control at the specified path.
LoadSchemaLoads schema information from a file or string data.
ParseParse the EDI document and fire parsing events.
ResetResets all properties to their default values.
SchemaCodeDefines a code value within a list of codes.
SchemaCodeListDefines a list of codes.
SchemaCompositeDefines a composite element.
SchemaElementDefines a simple element.
SchemaElementRefAdds a reference to an element in a segment or composite element.
SchemaEndEnds a schema definition.
SchemaGroupDefines a group of segments.
SchemaMessageDefines a message.
SchemaSegmentDefines a segment.
SchemaSegmentRefAdds a reference to a segment in a message or group.
SchemaStartStarts a schema definition.
ValidateValidate the EDI document and warn about any errors encountered.

Event List


The following is the full list of the events fired by the control with short descriptions. Click on the links for further details.

EndFunctionalGroupFires at the end of a functional group while parsing.
EndGroupFires at the end of a group while parsing a message.
EndInterchangeFires at the end of an interchange while parsing.
EndMessageFires at the end of a message while parsing.
ErrorFires when an error occurs during message processing. Normally, the control fails with an error.
ResolveSchemaFires whenever a new EDIFACT message is encountered and no schema is found for it.
SegmentFires at the end of a Segment while parsing.
StartFunctionalGroupFires at the beginning of a functional group while parsing.
StartGroupFires at the beginning of a group while parsing a message.
StartInterchangeFires at the beginning of an interchange while parsing.
StartMessageFires at the beginning of a message while parsing.
ValidateWarningFires to warn about validation errors.

Config Settings


The following is a list of config settings for the control with short descriptions. Click on the links for further details.

DelimitersFromUNAA flag indicating if delimiters were read from UNA segment.
InputFormatThe format of the input document.
MaxValidationErrorsThe maximum number of validation errors to return.

AckType Property (EDIFACTReader Control)

Specifies the type of ACK that will be generated by GenerateAck .

Syntax

edifactreadercontrol.AckType[=integer]

Possible Values

atFunctionalCONTRL(0), 
atTechnicalCONTRL(1)

Default Value

0

Remarks

This setting specifies the type of ACK that will be generated when GenerateAck is called. Options include:

Functional CONTRL (atFunctionalCONTRL - 0)A functional CONTRL message. If any syntax errors are encountered when parsing the message, the response will indicate the details of the issue.
Technical CONTRL (atTechnicalCONTRL - 1)A technical CONTRL message, which confirms receipt of the message but not the results of parsing the message.

This property is not available at design time.

Data Type

Integer

BuildDOM Property (EDIFACTReader Control)

Controls how much of the document will be stored during parsing.

Syntax

edifactreadercontrol.BuildDOM[=integer]

Possible Values

bdEntireDocument(0), 
bdInterchange(1), 
bdMessage(2), 
bdNone(3)

Default Value

0

Remarks

This property controls how much of the document will be stored in an internal model during parsing:

0 (bdEntireDocument) The entire document.
1 (bdInterchange) The current interchange.
2 (bdMessage) The current message.
3 (bdNone) No data will be stored and only the events can be used to process the document.

This property is not available at design time.

Data Type

Integer

ComponentDataType Property (EDIFACTReader Control)

The type of data contained in the element.

Syntax

edifactreadercontrol.ComponentDataType

Default Value

""

Remarks

The type of data contained in the element.

Possible values for EDIFACT include:

A The element can only contain alphabetic characters.
AN The element can contain any alphanumeric characters.
N The element can only contain numeric characters.
composite The element is a composite element containing multiple components.

Possible values for X12 include:

AN The element can contain any alphanumeric characters.
ID The element contains an identifier for a code value.
Nn The element contains a numeric integer value.
R The element contains a number with an optional decimal value.
DT The element contains a string representing a date.
TM The element contains a string representing a time.
B The element contains binary data.
composite The element is a composite element containing multiple components.

This property is read-only and not available at design time.

Data Type

String

ComponentIsComposite Property (EDIFACTReader Control)

Specifies whether the element is a simple or composite element.

Syntax

edifactreadercontrol.ComponentIsComposite

Default Value

False

Remarks

Specifies whether the element is a simple or composite element. If True, the element is a composite element that contains other components.

This property is read-only and not available at design time.

Data Type

Boolean

ComponentMaxLen Property (EDIFACTReader Control)

For a simple element, this specifies the maximum length of the element according to the schema.

Syntax

edifactreadercontrol.ComponentMaxLen

Default Value

0

Remarks

For a simple element, this specifies the maximum length of the element according to the schema.

This property is read-only and not available at design time.

Data Type

Integer

ComponentMinLen Property (EDIFACTReader Control)

For a simple element, this specifies the minimum length of the element according to the schema.

Syntax

edifactreadercontrol.ComponentMinLen

Default Value

0

Remarks

For a simple element, this specifies the minimum length of the element according to the schema.

This property is read-only and not available at design time.

Data Type

Integer

ComponentSchemaDesc Property (EDIFACTReader Control)

The description of the element as specified in the schema.

Syntax

edifactreadercontrol.ComponentSchemaDesc

Default Value

""

Remarks

The description of the element as specified in the schema.

This property is read-only and not available at design time.

Data Type

String

ComponentSchemaName Property (EDIFACTReader Control)

The name of the element as specified in the schema.

Syntax

edifactreadercontrol.ComponentSchemaName

Default Value

""

Remarks

The name of the element as specified in the schema.

This property is read-only and not available at design time.

Data Type

String

ComponentValue Property (EDIFACTReader Control)

If the element is a simple element, this property contains its value.

Syntax

edifactreadercontrol.ComponentValue

Default Value

""

Remarks

If the element is a simple element, this field contains its value.

This property is read-only and not available at design time.

Data Type

String

ComponentCount Property (EDIFACTReader Control)

The number of controls in the current Element.

Syntax

edifactreadercontrol.ComponentCount

Default Value

0

Remarks

If the current Element is composite, this property contains the number of components within the element.

This property is read-only and not available at design time.

Data Type

Integer

ComponentIndex Property (EDIFACTReader Control)

The index of the current Control.

Syntax

edifactreadercontrol.ComponentIndex[=integer]

Default Value

1

Remarks

If the current Element is composite, this property is used to specify a Component within the element.

Note: When BuildDOM is set to bdentiredoc, after Parse is called the entire EDI document is parsed and stored in memory. You can then use InterchangeIndex, FunctionalGroupIndex, MessageIndex, SegmentIndex, ElementIndex and ComponentIndex to navigate to a specific Component within the parsed document.

This property is not available at design time.

Data Type

Integer

DelimiterComponent Property (EDIFACTReader Control)

The character used to separate the controls in a composite element.

Syntax

edifactreadercontrol.DelimiterComponent[=string]

Default Value

":"

Remarks

The character used to separate the components in a composite element.

This property is not available at design time.

Data Type

String

DelimiterDecimal Property (EDIFACTReader Control)

The character used to separate the integer portion of a numeric value from the fractional portion.

Syntax

edifactreadercontrol.DelimiterDecimal[=string]

Default Value

"."

Remarks

The character used to separate the integer portion of a numeric value from the fractional portion.

This property is not available at design time.

Data Type

String

DelimiterElement Property (EDIFACTReader Control)

The delimiter used to separate elements within a segment.

Syntax

edifactreadercontrol.DelimiterElement[=string]

Default Value

"+"

Remarks

The delimiter used to separate elements within a segment.

This property is not available at design time.

Data Type

String

DelimiterRelease Property (EDIFACTReader Control)

The character used to escape other characters within a property.

Syntax

edifactreadercontrol.DelimiterRelease[=string]

Default Value

"?"

Remarks

The character used to escape other characters within a field. For example, with the default EDIFACT delimiters, "?+" should be considered "+" character that appears within a field, not an element separator.

This property is not available at design time.

Data Type

String

DelimiterRepetition Property (EDIFACTReader Control)

The character used to indicate a repeating element or control.

Syntax

edifactreadercontrol.DelimiterRepetition[=string]

Default Value

"*(syntax 4) or empty(syntax 3)"

Remarks

The character used to indicate a repeating element or component.

This property is not available at design time.

Data Type

String

DelimiterSegment Property (EDIFACTReader Control)

The character used to terminate a segment.

Syntax

edifactreadercontrol.DelimiterSegment[=string]

Default Value

"'"

Remarks

The character used to terminate a segment.

This property is not available at design time.

Data Type

String

ElementDataType Property (EDIFACTReader Control)

The type of data contained in the element.

Syntax

edifactreadercontrol.ElementDataType

Default Value

""

Remarks

The type of data contained in the element.

Possible values for EDIFACT include:

A The element can only contain alphabetic characters.
AN The element can contain any alphanumeric characters.
N The element can only contain numeric characters.
composite The element is a composite element containing multiple components.

Possible values for X12 include:

AN The element can contain any alphanumeric characters.
ID The element contains an identifier for a code value.
Nn The element contains a numeric integer value.
R The element contains a number with an optional decimal value.
DT The element contains a string representing a date.
TM The element contains a string representing a time.
B The element contains binary data.
composite The element is a composite element containing multiple components.

This property is read-only and not available at design time.

Data Type

String

ElementIsComposite Property (EDIFACTReader Control)

Specifies whether the element is a simple or composite element.

Syntax

edifactreadercontrol.ElementIsComposite

Default Value

False

Remarks

Specifies whether the element is a simple or composite element. If True, the element is a composite element that contains other components.

This property is read-only and not available at design time.

Data Type

Boolean

ElementMaxLen Property (EDIFACTReader Control)

For a simple element, this specifies the maximum length of the element according to the schema.

Syntax

edifactreadercontrol.ElementMaxLen

Default Value

0

Remarks

For a simple element, this specifies the maximum length of the element according to the schema.

This property is read-only and not available at design time.

Data Type

Integer

ElementMinLen Property (EDIFACTReader Control)

For a simple element, this specifies the minimum length of the element according to the schema.

Syntax

edifactreadercontrol.ElementMinLen

Default Value

0

Remarks

For a simple element, this specifies the minimum length of the element according to the schema.

This property is read-only and not available at design time.

Data Type

Integer

ElementSchemaDesc Property (EDIFACTReader Control)

The description of the element as specified in the schema.

Syntax

edifactreadercontrol.ElementSchemaDesc

Default Value

""

Remarks

The description of the element as specified in the schema.

This property is read-only and not available at design time.

Data Type

String

ElementSchemaName Property (EDIFACTReader Control)

The name of the element as specified in the schema.

Syntax

edifactreadercontrol.ElementSchemaName

Default Value

""

Remarks

The name of the element as specified in the schema.

This property is read-only and not available at design time.

Data Type

String

ElementValue Property (EDIFACTReader Control)

If the element is a simple element, this property contains its value.

Syntax

edifactreadercontrol.ElementValue

Default Value

""

Remarks

If the element is a simple element, this field contains its value.

This property is read-only and not available at design time.

Data Type

String

ElementCount Property (EDIFACTReader Control)

The number of elements in the current Segment.

Syntax

edifactreadercontrol.ElementCount

Default Value

0

Remarks

This property contains the number of elements in the current Segment.

This property is read-only and not available at design time.

Data Type

Integer

ElementIndex Property (EDIFACTReader Control)

The index of the current Element.

Syntax

edifactreadercontrol.ElementIndex[=integer]

Default Value

1

Remarks

This property is used to specify an Element within the current Segment.

Note: When BuildDOM is set to bdentiredoc, after Parse is called the entire EDI document is parsed and stored in memory. You can then use InterchangeIndex, FunctionalGroupIndex, MessageIndex, SegmentIndex and ElementIndex to navigate to specific Element within the parsed document.

This property is not available at design time.

Data Type

Integer

FGroupAppPassword Property (EDIFACTReader Control)

The application password as specified in the functional group header.

Syntax

edifactreadercontrol.FGroupAppPassword[=string]

Default Value

""

Remarks

The application password as specified in the functional group header.

This is an alphanumeric field with a value up to 14 characters long.

This property is not available at design time.

Data Type

String

FGroupAppRecipientIdentification Property (EDIFACTReader Control)

The name or code of the intended recipient of the message group.

Syntax

edifactreadercontrol.FGroupAppRecipientIdentification[=string]

Default Value

""

Remarks

The name or code of the intended recipient of the message group.

This is an alphanumeric field with a value up to 35 characters long.

This property is not available at design time.

Data Type

String

FGroupAppRecipientIDQualifier Property (EDIFACTReader Control)

The qualifier for the recipient's identification (if it contains a code value).

Syntax

edifactreadercontrol.FGroupAppRecipientIDQualifier[=string]

Default Value

""

Remarks

The qualifier for the recipient's identification (if it contains a code value).

This is an alphanumeric field with a value up to 4 characters long.

This property is not available at design time.

Data Type

String

FGroupAppSenderIdentification Property (EDIFACTReader Control)

The name or code of the message group's sender.

Syntax

edifactreadercontrol.FGroupAppSenderIdentification[=string]

Default Value

""

Remarks

The name or code of the message group's sender.

This is an alphanumeric field with a value up to 35 characters long.

This property is not available at design time.

Data Type

String

FGroupAppSenderIDQualifier Property (EDIFACTReader Control)

The qualifier for the sender's identification (if it contains a code value).

Syntax

edifactreadercontrol.FGroupAppSenderIDQualifier[=string]

Default Value

""

Remarks

The qualifier for the sender's identification (if it contains a code value).

This is an alphanumeric field with a value up to 4 characters long.

This property is not available at design time.

Data Type

String

FGroupAssociationAssignedCode Property (EDIFACTReader Control)

The assigned code for the message type.

Syntax

edifactreadercontrol.FGroupAssociationAssignedCode[=string]

Default Value

""

Remarks

The assigned code for the message type.

This is an alphanumeric field with a value up to 6 characters long.

This property is not available at design time.

Data Type

String

FGroupControllingAgency Property (EDIFACTReader Control)

A code value that indicates the agency responsible for maintaining the message specifications.

Syntax

edifactreadercontrol.FGroupControllingAgency[=string]

Default Value

""

Remarks

A code value that indicates the agency responsible for maintaining the message specifications.

This is an alphanumeric field with a value up to 3 characters long.

This property is not available at design time.

Data Type

String

FGroupDate Property (EDIFACTReader Control)

The date that the group of messages was prepared.

Syntax

edifactreadercontrol.FGroupDate[=string]

Default Value

""

Remarks

The date that the group of messages was prepared.

This property is not available at design time.

Data Type

String

FGroupGroupIdentification Property (EDIFACTReader Control)

The identification value for the functional group.

Syntax

edifactreadercontrol.FGroupGroupIdentification[=string]

Default Value

""

Remarks

The identification value for the functional group.

This is an alphanumeric field with a value up to 6 characters long.

This property is not available at design time.

Data Type

String

FGroupMessageRelease Property (EDIFACTReader Control)

The message release number for the message type appearing in the message group.

Syntax

edifactreadercontrol.FGroupMessageRelease[=string]

Default Value

""

Remarks

The message release number for the message type appearing in the message group.

This is an alphanumeric field with a value up to 3 characters long.

This property is not available at design time.

Data Type

String

FGroupMessageVersion Property (EDIFACTReader Control)

The message version number for message type appearing in the functional group.

Syntax

edifactreadercontrol.FGroupMessageVersion[=string]

Default Value

""

Remarks

The message version number for message type appearing in the functional group.

This is an alphanumeric field with a value up to 3 characters long.

This property is not available at design time.

Data Type

String

FGroupReferenceNumber Property (EDIFACTReader Control)

The reference number for the functional group.

Syntax

edifactreadercontrol.FGroupReferenceNumber[=string]

Default Value

""

Remarks

The reference number for the functional group.

This is an alphanumeric field with a value up to 14 characters long.

This property is not available at design time.

Data Type

String

FGroupTime Property (EDIFACTReader Control)

The time that the group of messages was prepared.

Syntax

edifactreadercontrol.FGroupTime[=string]

Default Value

""

Remarks

The time that the group of messages was prepared.

This property is not available at design time.

Data Type

String

FunctionalGroupCount Property (EDIFACTReader Control)

The number of FunctionalGroups in the current Interchange.

Syntax

edifactreadercontrol.FunctionalGroupCount

Default Value

0

Remarks

This property contains the number of FunctionalGroups in the current Interchange.

This property is read-only and not available at design time.

Data Type

Integer

FunctionalGroupIndex Property (EDIFACTReader Control)

The index of the current FunctionalGroup.

Syntax

edifactreadercontrol.FunctionalGroupIndex[=integer]

Default Value

1

Remarks

This property is used to specify a FunctionalGroup within the current Interchange.

Note: When BuildDOM is set to bdentiredoc, after Parse is called the entire EDI document is parsed and stored in memory, including all interchanges, and functional groups. You can then use InterchangeIndex and FunctionalGroupIndex to navigate to a specific FunctionalGroup within the parsed document.

This property is not available at design time.

Data Type

Integer

Group Property (EDIFACTReader Control)

Specifies the group to load segments from.

Syntax

edifactreadercontrol.Group[=string]

Default Value

""

Remarks

When this property is set, only segments from the specified group and iteration will be available through the Segment properties.

A path for a group consists of the name of the group followed by an index indicating the iteration, like this:

reader.Group = "CPSGroup[2]";

If the group is nested inside of another group, the parent and child are connected by a ".":

reader.Group = "CPSGroup[2].LINGroup[2]"; That can be repeated if a group is nested more than one level deep.

This property is not available at design time.

Data Type

String

InputData Property (EDIFACTReader Control)

The EDI message, specified as a string.

Syntax

edifactreadercontrol.InputData[=string]

Default Value

""

Remarks

Set this property to specify the input EDI message as a string. The message can then be parsed with Parse.

This property is not available at design time.

Data Type

String

InputFile Property (EDIFACTReader Control)

The file containing the EDI message.

Syntax

edifactreadercontrol.InputFile[=string]

Default Value

""

Remarks

Set this property to specify a file to read the input EDI message from. The message can then be parsed with Parse.

This property is not available at design time.

Data Type

String

InterchangeAckRequest Property (EDIFACTReader Control)

If this property is '1', an ACK was requested in response to this interchange.

Syntax

edifactreadercontrol.InterchangeAckRequest[=string]

Default Value

""

Remarks

If this field is '1', an ACK was requested in response to this interchange.

This property is not available at design time.

Data Type

String

InterchangeAgreementIdentifier Property (EDIFACTReader Control)

The identifier for the communication agreement used by the interchange.

Syntax

edifactreadercontrol.InterchangeAgreementIdentifier[=string]

Default Value

""

Remarks

The identifier for the communication agreement used by the interchange.

This is an alphanumeric field with a value up to 35 characters long.

This property is not available at design time.

Data Type

String

InterchangeApplicationReference Property (EDIFACTReader Control)

If the interchange contains only one type of message, this can contain the identifier for the type of message.

Syntax

edifactreadercontrol.InterchangeApplicationReference[=string]

Default Value

""

Remarks

If the interchange contains only one type of message, this can contain the identifier for the type of message.

This is an alphanumeric field with a value up to 14 characters long.

This property is not available at design time.

Data Type

String

InterchangeCharacterEncoding Property (EDIFACTReader Control)

The character encoding used by the interchange.

Syntax

edifactreadercontrol.InterchangeCharacterEncoding[=string]

Default Value

""

Remarks

The character encoding used by the interchange.

This is an alphanumeric field with a value up to 3 characters long, and is only present for EDIFACT syntax 4.

This property is not available at design time.

Data Type

String

InterchangeCodeListVersionNumber Property (EDIFACTReader Control)

The identifier for the communication agreement used by the interchange.

Syntax

edifactreadercontrol.InterchangeCodeListVersionNumber[=string]

Default Value

""

Remarks

The identifier for the communication agreement used by the interchange.

This is an alphanumeric field with a value up to 6 characters long.

This property is not available at design time.

Data Type

String

InterchangeDate Property (EDIFACTReader Control)

The date that the interchange was prepared.

Syntax

edifactreadercontrol.InterchangeDate[=string]

Default Value

""

Remarks

The date that the interchange was prepared.

This property is not available at design time.

Data Type

String

InterchangeProcessingPriorityCode Property (EDIFACTReader Control)

A 1-character code that requests a specific processing priority for the interchange.

Syntax

edifactreadercontrol.InterchangeProcessingPriorityCode[=string]

Default Value

""

Remarks

A 1-character code that requests a specific processing priority for the interchange.

This property is not available at design time.

Data Type

String

InterchangeRecipientIdentification Property (EDIFACTReader Control)

The identification for the interchange's recipient.

Syntax

edifactreadercontrol.InterchangeRecipientIdentification[=string]

Default Value

""

Remarks

The identification for the interchange's recipient.

This is an alphanumeric field with a value up to 35 characters long.

This property is not available at design time.

Data Type

String

InterchangeRecipientIDQualifier Property (EDIFACTReader Control)

The qualifier for the recipient identification code.

Syntax

edifactreadercontrol.InterchangeRecipientIDQualifier[=string]

Default Value

""

Remarks

The qualifier for the recipient identification code.

This is an alphanumeric field with a value up to 4 characters long.

This property is not available at design time.

Data Type

String

InterchangeRecipientInternalIdentification Property (EDIFACTReader Control)

More specific recipient identification for internal use.

Syntax

edifactreadercontrol.InterchangeRecipientInternalIdentification[=string]

Default Value

""

Remarks

More specific recipient identification for internal use.

This is an alphanumeric field with a value up to 35 characters long.

This property is not available at design time.

Data Type

String

InterchangeRecipientInternalSubIdentification Property (EDIFACTReader Control)

A sub-identification string for the receiver for internal use.

Syntax

edifactreadercontrol.InterchangeRecipientInternalSubIdentification[=string]

Default Value

""

Remarks

A sub-identification string for the receiver for internal use.

This is an alphanumeric field with a value up to 35 characters long.

This property is not available at design time.

Data Type

String

InterchangeRecipientPassword Property (EDIFACTReader Control)

A password to be verified by the recipient, such as a system or network password.

Syntax

edifactreadercontrol.InterchangeRecipientPassword[=string]

Default Value

""

Remarks

A password to be verified by the recipient, such as a system or network password.

This is an alphanumeric field with a value up to 14 characters long.

This property is not available at design time.

Data Type

String

InterchangeRecipientPasswordQualifier Property (EDIFACTReader Control)

A qualifier for the recipient password.

Syntax

edifactreadercontrol.InterchangeRecipientPasswordQualifier[=string]

Default Value

""

Remarks

A qualifier for the recipient password.

This is an alphanumeric field with a value up to 2 characters long.

This property is not available at design time.

Data Type

String

InterchangeReferenceNumber Property (EDIFACTReader Control)

A reference number for the interchange.

Syntax

edifactreadercontrol.InterchangeReferenceNumber[=string]

Default Value

""

Remarks

A reference number for the interchange.

This is an alphanumeric field with a value up to 14 characters long.

This property is not available at design time.

Data Type

String

InterchangeSenderIdentification Property (EDIFACTReader Control)

The identification for the interchange's sender.

Syntax

edifactreadercontrol.InterchangeSenderIdentification[=string]

Default Value

""

Remarks

The identification for the interchange's sender.

This is an alphanumeric field with a value up to 35 characters long.

This property is not available at design time.

Data Type

String

InterchangeSenderIDQualifier Property (EDIFACTReader Control)

The qualifier for the sender identification code.

Syntax

edifactreadercontrol.InterchangeSenderIDQualifier[=string]

Default Value

""

Remarks

The qualifier for the sender identification code.

This is an alphanumeric field with a value up to 4 characters long.

This property is not available at design time.

Data Type

String

InterchangeSenderInternalIdentification Property (EDIFACTReader Control)

More specific sender identification for internal use.

Syntax

edifactreadercontrol.InterchangeSenderInternalIdentification[=string]

Default Value

""

Remarks

More specific sender identification for internal use.

This is an alphanumeric field with a value up to 35 characters long.

This property is not available at design time.

Data Type

String

InterchangeSenderInternalSubIdentification Property (EDIFACTReader Control)

A sub-identification string for the sender for internal use.

Syntax

edifactreadercontrol.InterchangeSenderInternalSubIdentification[=string]

Default Value

""

Remarks

A sub-identification string for the sender for internal use.

This is an alphanumeric field with a value up to 35 characters long.

This property is not available at design time.

Data Type

String

InterchangeSyntaxIdentifier Property (EDIFACTReader Control)

A identifier specifying the controlling agency and valid character set.

Syntax

edifactreadercontrol.InterchangeSyntaxIdentifier[=string]

Default Value

""

Remarks

A identifier specifying the controlling agency and valid character set.

This is an alphanumeric field with a value up to 4 characters long.

This property is not available at design time.

Data Type

String

InterchangeSyntaxVersionNumber Property (EDIFACTReader Control)

A 1-character numeric value indicating the syntax version.

Syntax

edifactreadercontrol.InterchangeSyntaxVersionNumber[=string]

Default Value

""

Remarks

A 1-character numeric value indicating the syntax version.

This property is not available at design time.

Data Type

String

InterchangeTestIndicator Property (EDIFACTReader Control)

If this property is '1', the interchange is a test interchange.

Syntax

edifactreadercontrol.InterchangeTestIndicator[=string]

Default Value

""

Remarks

If this field is '1', the interchange is a test interchange.

This property is not available at design time.

Data Type

String

InterchangeTime Property (EDIFACTReader Control)

The time that the interchange was prepared.

Syntax

edifactreadercontrol.InterchangeTime[=string]

Default Value

""

Remarks

The time that the interchange was prepared.

This property is not available at design time.

Data Type

String

InterchangeCount Property (EDIFACTReader Control)

The number of Interchanges in the document.

Syntax

edifactreadercontrol.InterchangeCount

Default Value

0

Remarks

This property contains the number of Interchanges in the current document.

This property is read-only and not available at design time.

Data Type

Integer

InterchangeIndex Property (EDIFACTReader Control)

The index of the current Interchange.

Syntax

edifactreadercontrol.InterchangeIndex[=integer]

Default Value

1

Remarks

This property is used to specify an Interchange within the document.

Note: When BuildDOM is set to bdentiredoc, after Parse is called the entire EDI document is parsed and stored in memory, including all interchanges. You can then use InterchangeIndex to navigate to specific Interchange within the parsed document.

This property is not available at design time.

Data Type

Integer

MsgAssociationAssignedCode Property (EDIFACTReader Control)

A code assigned to the message by the controlling organization.

Syntax

edifactreadercontrol.MsgAssociationAssignedCode[=string]

Default Value

""

Remarks

A code assigned to the message by the controlling organization.

This is an alphanumeric field with a value up to 6 characters long.

This property is not available at design time.

Data Type

String

MsgCodeListVersionNumber Property (EDIFACTReader Control)

The version number of the code list that should be used.

Syntax

edifactreadercontrol.MsgCodeListVersionNumber[=string]

Default Value

""

Remarks

The version number of the code list that should be used.

This is an alphanumeric field with a value up to 6 characters long. This field only appears in EDIFACT syntax version 4.

This property is not available at design time.

Data Type

String

MsgCommonAccessReference Property (EDIFACTReader Control)

A reference value to associate this message with related messages.

Syntax

edifactreadercontrol.MsgCommonAccessReference[=string]

Default Value

""

Remarks

A reference value to associate this message with related messages.

This is an alphanumeric field with a value up to 35 characters long.

This property is not available at design time.

Data Type

String

MsgControllingAgency Property (EDIFACTReader Control)

A code that identifies the controlling agency for this message type.

Syntax

edifactreadercontrol.MsgControllingAgency[=string]

Default Value

""

Remarks

A code that identifies the controlling agency for this message type.

This is an alphanumeric field with a value up to 3 characters long.

This property is not available at design time.

Data Type

String

MsgFirstAndLastTransfer Property (EDIFACTReader Control)

A single-character property that indicates the first and last messages in a related set.

Syntax

edifactreadercontrol.MsgFirstAndLastTransfer[=string]

Default Value

""

Remarks

A single-character field that indicates the first and last messages in a related set.

This property is not available at design time.

Data Type

String

MsgMessageImplControllingAgency Property (EDIFACTReader Control)

A code value that identifies the controlling agency for the message implementation.

Syntax

edifactreadercontrol.MsgMessageImplControllingAgency[=string]

Default Value

""

Remarks

A code value that identifies the controlling agency for the message implementation.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

This property is not available at design time.

Data Type

String

MsgMessageImplIdentification Property (EDIFACTReader Control)

Identifies the message implementation.

Syntax

edifactreadercontrol.MsgMessageImplIdentification[=string]

Default Value

""

Remarks

Identifies the message implementation.

This is an alphanumeric field with a value up to 14 characters long. This field only appears in EDIFACT syntax version 4.

This property is not available at design time.

Data Type

String

MsgMessageImplRelease Property (EDIFACTReader Control)

Identifies the release number for the message implementation.

Syntax

edifactreadercontrol.MsgMessageImplRelease[=string]

Default Value

""

Remarks

Identifies the release number for the message implementation.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

This property is not available at design time.

Data Type

String

MsgMessageImplVersion Property (EDIFACTReader Control)

Identifies the version number for the message implementation.

Syntax

edifactreadercontrol.MsgMessageImplVersion[=string]

Default Value

""

Remarks

Identifies the version number for the message implementation.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

This property is not available at design time.

Data Type

String

MsgMessageRelease Property (EDIFACTReader Control)

Identifies the release number for the message.

Syntax

edifactreadercontrol.MsgMessageRelease[=string]

Default Value

""

Remarks

Identifies the release number for the message.

This is an alphanumeric field with a value up to 3 characters long.

This property is not available at design time.

Data Type

String

MsgMessageSubsetControllingAgency Property (EDIFACTReader Control)

A code value that identifies the controlling agency for the message subset.

Syntax

edifactreadercontrol.MsgMessageSubsetControllingAgency[=string]

Default Value

""

Remarks

A code value that identifies the controlling agency for the message subset.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

This property is not available at design time.

Data Type

String

MsgMessageSubsetIdentification Property (EDIFACTReader Control)

Identifies the message subset.

Syntax

edifactreadercontrol.MsgMessageSubsetIdentification[=string]

Default Value

""

Remarks

Identifies the message subset.

This is an alphanumeric field with a value up to 14 characters long. This field only appears in EDIFACT syntax version 4.

This property is not available at design time.

Data Type

String

MsgMessageSubsetRelease Property (EDIFACTReader Control)

Identifies the release number for the message subset.

Syntax

edifactreadercontrol.MsgMessageSubsetRelease[=string]

Default Value

""

Remarks

Identifies the release number for the message subset.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

This property is not available at design time.

Data Type

String

MsgMessageSubsetVersion Property (EDIFACTReader Control)

Identifies the version number for the message subset.

Syntax

edifactreadercontrol.MsgMessageSubsetVersion[=string]

Default Value

""

Remarks

Identifies the version number for the message subset.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

This property is not available at design time.

Data Type

String

MsgMessageType Property (EDIFACTReader Control)

A code identifying the message's type.

Syntax

edifactreadercontrol.MsgMessageType[=string]

Default Value

""

Remarks

A code identifying the message's type.

This is an alphanumeric field with a value up to 6 characters long.

This property is not available at design time.

Data Type

String

MsgMessageTypeSubFunctionIdentification Property (EDIFACTReader Control)

A code identifying the sub-function of the message's type.

Syntax

edifactreadercontrol.MsgMessageTypeSubFunctionIdentification[=string]

Default Value

""

Remarks

A code identifying the sub-function of the message's type.

This is an alphanumeric field with a value up to 6 characters long. This field only appears in EDIFACT syntax version 4.

This property is not available at design time.

Data Type

String

MsgMessageVersion Property (EDIFACTReader Control)

Identifies the version number for the message.

Syntax

edifactreadercontrol.MsgMessageVersion[=string]

Default Value

""

Remarks

Identifies the version number for the message.

This is an alphanumeric field with a value up to 3 characters long.

This property is not available at design time.

Data Type

String

MsgReferenceNumber Property (EDIFACTReader Control)

A unique reference number for the message.

Syntax

edifactreadercontrol.MsgReferenceNumber[=string]

Default Value

""

Remarks

A unique reference number for the message.

This is an alphanumeric field with a value up to 14 characters long.

This property is not available at design time.

Data Type

String

MsgScenarioControllingAgency Property (EDIFACTReader Control)

Identifies the controlling agency for the message scenario.

Syntax

edifactreadercontrol.MsgScenarioControllingAgency[=string]

Default Value

""

Remarks

Identifies the controlling agency for the message scenario.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

This property is not available at design time.

Data Type

String

MsgScenarioIdentification Property (EDIFACTReader Control)

The identifier for the message scenario.

Syntax

edifactreadercontrol.MsgScenarioIdentification[=string]

Default Value

""

Remarks

The identifier for the message scenario.

This is an alphanumeric field with a value up to 14 characters long. This field only appears in EDIFACT syntax version 4.

This property is not available at design time.

Data Type

String

MsgScenarioRelease Property (EDIFACTReader Control)

The message scenario's release number.

Syntax

edifactreadercontrol.MsgScenarioRelease[=string]

Default Value

""

Remarks

The message scenario's release number.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

This property is not available at design time.

Data Type

String

MsgScenarioVersion Property (EDIFACTReader Control)

The message scenario's version number.

Syntax

edifactreadercontrol.MsgScenarioVersion[=string]

Default Value

""

Remarks

The message scenario's version number.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

This property is not available at design time.

Data Type

String

MsgSequenceOfTransfers Property (EDIFACTReader Control)

Specifies the message's position in a sequence.

Syntax

edifactreadercontrol.MsgSequenceOfTransfers[=string]

Default Value

""

Remarks

Specifies the message's position in a sequence.

This is an alphanumeric field with a value up to 2 characters long.

This property is not available at design time.

Data Type

String

MessageCount Property (EDIFACTReader Control)

The number of message in the current Interchange or FunctionalGroup.

Syntax

edifactreadercontrol.MessageCount

Default Value

0

Remarks

This property contains the number of messages in the current Interchange or FunctionalGroup.

This property is read-only and not available at design time.

Data Type

Integer

MessageIndex Property (EDIFACTReader Control)

The index of the current Message.

Syntax

edifactreadercontrol.MessageIndex[=integer]

Default Value

1

Remarks

This property is used to specify a Message within the current Interchange or FunctionalGroup.

Note: When BuildDOM is set to bdentiredoc, after Parse is called the entire EDI document is parsed and stored in memory, including all interchanges, functional groups, and messages. You can then use InterchangeIndex, FunctionalGroupIndex and MessageIndex to navigate to a specific Message within the parsed document.

This property is not available at design time.

Data Type

Integer

SegmentOptional Property (EDIFACTReader Control)

Specifies whether the segment is required or optional.

Syntax

edifactreadercontrol.SegmentOptional

Default Value

False

Remarks

Specifies whether the segment is required or optional. If True, the element is optional.

This property is read-only and not available at design time.

Data Type

Boolean

SegmentPath Property (EDIFACTReader Control)

Contains the path to the segment, including the groups that the segment is contained in.

Syntax

edifactreadercontrol.SegmentPath

Default Value

""

Remarks

Contains the path to the segment, including the groups that the segment is contained in.

This property is read-only and not available at design time.

Data Type

String

SegmentSchemaPath Property (EDIFACTReader Control)

Contains a numeric representation of the path to the segment, using the indexes within the schema, such as \\4[3]\\5[6]\\7[8] .

Syntax

edifactreadercontrol.SegmentSchemaPath

Default Value

""

Remarks

Contains a numeric representation of the path to the segment, using the indexes within the schema, such as \4[3]\5[6]\7[8].

This property is read-only and not available at design time.

Data Type

String

SegmentTag Property (EDIFACTReader Control)

The tag of the segment, such as BGM , DTM , FTX , etc.

Syntax

edifactreadercontrol.SegmentTag

Default Value

""

Remarks

The tag of the segment, such as BGM, DTM, FTX, etc.

This property is read-only and not available at design time.

Data Type

String

SegmentCount Property (EDIFACTReader Control)

The number of segments in the current Message.

Syntax

edifactreadercontrol.SegmentCount

Default Value

0

Remarks

This property contains the number of elements in the current Message.

This property is read-only and not available at design time.

Data Type

Integer

SegmentIndex Property (EDIFACTReader Control)

The index of the current segment.

Syntax

edifactreadercontrol.SegmentIndex[=integer]

Default Value

1

Remarks

This property is used to specify a Segment within the current Message.

Note: When BuildDOM is set to bdentiredoc, after Parse is called the entire EDI document is parsed and stored in memory. You can then use InterchangeIndex, FunctionalGroupIndex, MessageIndex and SegmentIndex to navigate to specific Segment within the parsed document.

This property is not available at design time.

Data Type

Integer

ValidateOnParse Property (EDIFACTReader Control)

When True , the control will validate any documents it parses.

Syntax

edifactreadercontrol.ValidateOnParse[=boolean]

Default Value

False

Remarks

When this property is set to True, the control will perform validation on the document when Parse is called. The ValidateWarning event will fire for each error it encounters.

This property is not available at design time.

Data Type

Boolean

Config Method (EDIFACTReader Control)

Sets or retrieves a configuration setting.

Syntax

edifactreadercontrol.Config ConfigurationString

Remarks

Config is a generic method available in every control. It is used to set and retrieve configuration settings for the control.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the control, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY, you must call Config("PROPERTY=VALUE"), where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY"). The value will be returned as a string.

GenerateAck Method (EDIFACTReader Control)

Generates an ACK in response to the most recently parsed message.

Syntax

edifactreadercontrol.GenerateAck 

Remarks

After parsing a message, call this method to generate an ACK that you can send back in response. The type of ACK generated can be controlled by setting the AckType property.

GetElementValue Method (EDIFACTReader Control)

Returns the value of the element or control at the specified path.

Syntax

edifactreadercontrol.GetElementValue Path

Remarks

This method returns the value of the element at the specified path. The path starts at the current Message and consists of groups (with indexes to indicate the iteration), a segment tag, and 1-2 indexes to indicate the element or component.

For a simple element the path should include the path to a specific iteration of a group (as in the Group property), followed by a segment tag and an index for the element position within the segment, each separated by a ".":

reader.GetElementValue("CPSGroup[2].LINGroup[2].LIN.1");

When selecting a component of a composite element, the component index should be added after the element index:

reader.GetElementValue("CPSGroup[2].LINGroup[2].QTY.1.2");

LoadSchema Method (EDIFACTReader Control)

Loads schema information from a file or string data.

Syntax

edifactreadercontrol.LoadSchema fileOrData, messageName

Remarks

This method loads schema information for use when parsing, validating, and translating messages.

The FileOrData parameter can be set to the path of a file containing schema data, or can be set to the contents of a schema file directly.

MessageName can be set to the name of a specific message to load only the specified message's schema information. If left empty or set to "*", the entire schema will be loaded.

Parse Method (EDIFACTReader Control)

Parse the EDI document and fire parsing events.

Syntax

edifactreadercontrol.Parse 

Remarks

This method parses the input EDI document, firing the following events as it parses:

When multiple input sources are specified, only the highest-priority input will be used, in the following order:

  1. SetInputStream
  2. InputFile
  3. InputData

Reset Method (EDIFACTReader Control)

Resets all properties to their default values.

Syntax

edifactreadercontrol.Reset 

Remarks

This method resets all properties of the component to their default values as specified in the property definitions.

SchemaCode Method (EDIFACTReader Control)

Defines a code value within a list of codes.

Syntax

edifactreadercontrol.SchemaCode SchemaId, CodeListId, Value, Description

Remarks

Creates a schema definition for a code value within a particular list of codes.

This method can be used when defining a schema instead of loading one from a file.

SchemaCodeList Method (EDIFACTReader Control)

Defines a list of codes.

Syntax

edifactreadercontrol.SchemaCodeList SchemaId, CodeListId, Description

Remarks

Creates a schema definition for an empty list of codes. SchemaCode can be used to add code values to the list.

This method can be used when defining a schema instead of loading one from a file.

SchemaComposite Method (EDIFACTReader Control)

Defines a composite element.

Syntax

edifactreadercontrol.SchemaComposite SchemaId, CompositeId, Description

Remarks

Creates a schema definition for a composite element. SchemaElementRef can be used to add components to the element.

This method can be used when defining a schema instead of loading one from a file.

SchemaElement Method (EDIFACTReader Control)

Defines a simple element.

Syntax

edifactreadercontrol.SchemaElement SchemaId, ElementId, DataType, MinLength, MaxLength, CodeId, Description

Remarks

Creates a schema definition for a simple element.

This method can be used when defining a schema instead of loading one from a file.

SchemaElementRef Method (EDIFACTReader Control)

Adds a reference to an element in a segment or composite element.

Syntax

edifactreadercontrol.SchemaElementRef SchemaId, ParentId, ElementId, RefId, Required, MaxCount

Remarks

Adds a reference to an element to the specified parent, which can be the most recently defined segment or composite element.

This method can be used when defining a schema instead of loading one from a file.

SchemaEnd Method (EDIFACTReader Control)

Ends a schema definition.

Syntax

edifactreadercontrol.SchemaEnd 

Remarks

Ends a schema definition when a schema is being defined manually instead of loaded from a file.

SchemaGroup Method (EDIFACTReader Control)

Defines a group of segments.

Syntax

edifactreadercontrol.SchemaGroup SchemaId, GroupPath, GroupId, Required, MaxCount

Remarks

Creates a schema definition for a group of segments. SchemaSegmentRef can be used to add references to defined segments.

This method can be used when defining a schema instead of loading one from a file.

SchemaMessage Method (EDIFACTReader Control)

Defines a message.

Syntax

edifactreadercontrol.SchemaMessage SchemaId, MessageId, Description

Remarks

Creates a schema definition for a message. SchemaSegmentRef and SchemaGroup can be used to add segment references and groups to the message.

This method can be used when defining a schema instead of loading one from a file.

SchemaSegment Method (EDIFACTReader Control)

Defines a segment.

Syntax

edifactreadercontrol.SchemaSegment SchemaId, SegmentId, Description

Remarks

Creates a schema definition for a segment. SchemaElementRef can be used to add component references to the segment.

This method can be used when defining a schema instead of loading one from a file.

SchemaSegmentRef Method (EDIFACTReader Control)

Adds a reference to a segment in a message or group.

Syntax

edifactreadercontrol.SchemaSegmentRef SchemaId, SegmentPath, SegmentId, Required, MaxCount

Remarks

Adds a reference to a segment to the specified path.

This method can be used when defining a schema instead of loading one from a file.

SchemaStart Method (EDIFACTReader Control)

Starts a schema definition.

Syntax

edifactreadercontrol.SchemaStart SchemaId

Remarks

Starts manually defining a schema, as an alternative to loading one from a file.

Validate Method (EDIFACTReader Control)

Validate the EDI document and warn about any errors encountered.

Syntax

edifactreadercontrol.Validate 

Remarks

This method parses the input EDI document, firing the ValidateWarning event for any non-blocking errors it encounters.

EndFunctionalGroup Event (EDIFACTReader Control)

Fires at the end of a functional group while parsing.

Syntax

Sub edifactreadercontrol_EndFunctionalGroup(Tag As String, MessageCount As Integer, ReferenceNumber As String)

Remarks

This event fires when the control encounters the end of a functional group while parsing a document.

EndGroup Event (EDIFACTReader Control)

Fires at the end of a group while parsing a message.

Syntax

Sub edifactreadercontrol_EndGroup(Name As String, SchemaIndex As Integer)

Remarks

This event fires when the control encounters the end of a group while parsing a message.

EndInterchange Event (EDIFACTReader Control)

Fires at the end of an interchange while parsing.

Syntax

Sub edifactreadercontrol_EndInterchange(Tag As String, GroupCount As Integer, ReferenceNumber As String)

Remarks

This event fires at the end of an interchange while parsing a document.

EndMessage Event (EDIFACTReader Control)

Fires at the end of a message while parsing.

Syntax

Sub edifactreadercontrol_EndMessage(Tag As String, SegmentCount As Integer, ReferenceNumber As String)

Remarks

This event fires when the control encounters the end of a message while parsing a document.

Error Event (EDIFACTReader Control)

Fires when an error occurs during message processing. Normally, the control fails with an error.

Syntax

Sub edifactreadercontrol_Error(ErrorCode As Integer, Description As String)

Remarks

The Error event is fired in case of exceptional conditions during message processing. Normally, the control fails with an error.

ConnectionId is the associated client Id, ErrorCode contains an error code, and Description contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to the Error Codes section.

ResolveSchema Event (EDIFACTReader Control)

Fires whenever a new EDIFACT message is encountered and no schema is found for it.

Syntax

Sub edifactreadercontrol_ResolveSchema(MessageVersion As String, MessageType As String)

Remarks

This method fires when the control encounters an EDIFACT message it has not loaded a schema for. The parameters of the event can be used to locate the correct schema and load it with LoadSchema.

MessageVersion - The EDIFACT version of the message, such as D97A.

MessageType - The type of message, such as INVOIC.

After the event fires, if the control still doesn't have a matching schema, then it will attempt schema-less parsing of the EDIFACT message.

Segment Event (EDIFACTReader Control)

Fires at the end of a Segment while parsing.

Syntax

Sub edifactreadercontrol_Segment(Tag As String, SchemaPath As String, Optional As Boolean, ElementCount As Integer, SchemaIndex As Integer, SegmentIndex As Integer, MaxCount As Integer, Path As String)

Remarks

Fires at the end of a Segment while parsing a document

StartFunctionalGroup Event (EDIFACTReader Control)

Fires at the beginning of a functional group while parsing.

Syntax

Sub edifactreadercontrol_StartFunctionalGroup(Tag As String, AppSenderIdentification As String, AppRecipientIdentification As String, DateTime As String, ReferenceNumber As String)

Remarks

This event fires when the control encounters the start of a functional group while parsing a document.

StartGroup Event (EDIFACTReader Control)

Fires at the beginning of a group while parsing a message.

Syntax

Sub edifactreadercontrol_StartGroup(Name As String, SchemaIndex As Integer, MaxCount As Integer, Path As String)

Remarks

This event fires when the control encounters the start of a group while parsing a message.

StartInterchange Event (EDIFACTReader Control)

Fires at the beginning of an interchange while parsing.

Syntax

Sub edifactreadercontrol_StartInterchange(Tag As String, SyntaxIdentifier As String, SyntaxVersion As String, SenderIdentification As String, RecipientIdentification As String, DateTime As String, ReferenceNumber As String)

Remarks

This event fires at the beginning of an interchange while parsing a document.

StartMessage Event (EDIFACTReader Control)

Fires at the beginning of a message while parsing.

Syntax

Sub edifactreadercontrol_StartMessage(Tag As String, MessageRelease As String, MessageType As String, ReferenceNumber As String, SchemaLoaded As Boolean)

Remarks

This event fires when the control encounters the start of a message while parsing a document.

ValidateWarning Event (EDIFACTReader Control)

Fires to warn about validation errors.

Syntax

Sub edifactreadercontrol_ValidateWarning(Position As Long64, Line As Integer, Column As Integer, ErrorCode As String, ErrorMessage As String, ErrorType As Integer)

Remarks

When the control encounters a non-blocking error while validating a document, this event fires with information about the error.

Config Settings (EDIFACTReader Control)

The control accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the control, access to these internal properties is provided through the Config method.

EDIFACTReader Config Settings

DelimitersFromUNA:   A flag indicating if delimiters were read from UNA segment.

This setting controls whether delimiters were read from the UNA segment. The default value is false. This configuration setting is read-only.

InputFormat:   The format of the input document.

This setting controls the type of input document for parsing. Possible values are:

0 (default)EDIFACT
1XML
MaxValidationErrors:   The maximum number of validation errors to return.

This setting controls the maximum number of validation errors that will be returned during the validation process. The default value is 200.

Trappable Errors (EDIFACTReader Control)

EDIFACTReader Errors

20203    Invalid argument.
20305    Cannot write to file.
21004    Could not find the selected schema in the chosen file.
21100    Encountered an unexpected segment tag.
21101    Attempted to perform an action while the component was busy, or close an incomplete interchange.
21045    Tried to load an invalid schema file.
21202    The index is out of range.
21203    The selected ACK type is invalid.
21204    Encountered an error while validating the UNA segment.