X12Reader Control

Properties   Methods   Events   Config Settings   Errors  

The X12Reader control efficiently parses complete X12 transmissions, providing a convenient way to extract and explore data from all included transaction sets.

Syntax

X12Reader

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 .
BuildDOMSpecifies how much of the current document should be held in memory.
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 delimiter separating controls.
DelimiterElementThe delimiter separating elements.
DelimiterRepetitionThe delimiter separating controls.
DelimiterSegmentThe delimiter separating segments.
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.
FGroupAppReceiverCodeThe name or code of the intended receiver of the transaction set group.
FGroupAppSenderCodeCode identifying the sender of FunctionalGroup This is an alphanumeric property with a value between 2 and 15 characters long.
FGroupDateThe date that the group of transaction sets was prepared.
FGroupFunctionalIdentifierCodeA code identifying the type of transaction sets included in the functional group.
FGroupGroupControlNumAn identification number assigned by the sender to uniquely identify the group of transaction sets.
FGroupResponsibleAgencyCodeA code identifying the issuer of the standard that the transaction set conforms to.
FGroupTimeThe time that the group of transaction sets was prepared.
FGroupVersionCode indicating the version of the X12 standard used to construct the transaction set.
FunctionalGroupCountThe number of FunctionalGroups in the current Interchange.
FunctionalGroupIndexThe index of the current FunctionalGroup.
InputDataThe EDI message, specified as a string.
InputFileThe file containing the EDI message.
InterchangeAckRequestCode indicating whether an interchange acknowledgment is requested.
InterchangeAuthorizationInfoInformation used for additional identification or authorization of the interchange sender or the data in the interchange.
InterchangeAuthorizationInfoQualifierA code indicating the type of data supplied in Authorization Information property.
InterchangeDateThe date that the Interchange was prepared.
InterchangeInterchangeControlNumA control number assigned by the sender to uniquely identify the interchange.
InterchangeInterchangeControlVersionNumA code specifying the version of the X12 standard used to construct the Interchange.
InterchangeReceiverIDThe identification code of the receiver of the transaction set.
InterchangeReceiverIDQualifierA code that identifies the format of the receiver ID.
InterchangeSecurityInfoCoded security information associated with the Interchange.
InterchangeSecurityInfoQualifierA code indicating the type of data in the Security Information property.
InterchangeSenderIDThe identification code of the sender of the transaction set.
InterchangeSenderIDQualifierA code that identifies the format of the sender ID.
InterchangeTimeThe time that the Interchange sets was prepared.
InterchangeUsageIndicatorCode to indicate whether the interchange is a test or production.
InterchangeCountThe number of Interchanges in the document.
InterchangeIndexThe index of the current Interchange.
LoopSpecifies the loop to load segments from.
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 TransactionSet.
SegmentIndexThis property is used to specify a Segment within the current TransactionSet .
TransSetImpConventionReferenceReference used to identify the implementation convention.
TransSetTransactionSetControlNumThe unique transaction set control number assigned for a transaction set.
TransSetTransactionSetIDCodeThe identifier code for the transaction set.
TransactionSetCountThe number of TransactionSets in the current FunctionalGroup.
TransactionSetIndexThe current TransactionSet index.
ValidateOnParseWhen true, the control will validate any documents it parses.
ValidationErrorCountThe number of records in the ValidationError arrays.
ValidationErrorColumnThe column number where the error occurred.
ValidationErrorComponentIndexThis property holds the position of the control element where the error occurred.
ValidationErrorElementIndexThis property holds the position of the element where the error occurred.
ValidationErrorErrorCodeThe ErrorCode property contains the type of error encountered.
ValidationErrorErrorMessageErrorMessage is a textual description of the error.
ValidationErrorErrorTypeIndicates the level of the document where the error was encountered.
ValidationErrorFGroupIndexThis property holds the position of the functional group where the error occurred.
ValidationErrorInterchangeIndexThis property holds the position of the interchange where the error occurred.
ValidationErrorLineThe line number where the error occurred.
ValidationErrorPositionThis property holds the byte position in the EDI stream where the error occurred.
ValidationErrorSegmentIndexThis property is the index of the segment where the error occurred.
ValidationErrorSegmentTagThis property specifies the tag name of the segment where the error occurred.
ValidationErrorTransactionSetIndexThis property holds the position of the message where the error occurred.

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 TransactionSet.
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.
ResetSets the control to its initial state.
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.
EndInterchangeFires at the end of a interchange while parsing.
EndLoopFires at the end of a loop while parsing.
EndTransactionSetFires at the end of a transaction set while parsing.
ErrorFires when a parsing error occurs.
ResolveSchemaFires to request schema information for a specific transaction set.
SegmentFires at the end of a Segment while parsing.
StartFunctionalGroupFires at the beginning of a functional group while parsing.
StartInterchangeFires at the beginning of an interchange while parsing.
StartLoopFires at the beginning of a loop while parsing a transaction set.
StartTransactionSetFires at the beginning of a transaction set 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.

InputFormatThe format of the input document.
MaxValidationErrorsThe maximum number of validation errors to return.

AckType Property (X12Reader Control)

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

Syntax

x12readercontrol.AckType[=integer]

Possible Values

at997(0), 
at999(1), 
atTA1(2)

Default Value

0

Remarks

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

997 Functional Acknowledgement (at997 - 0)A 997 functional acknowledgement. If any syntax errors are encountered when parsing the data, the response will indicate the details of the issue.
999 Implementation Acknowledgement (at999 - 0)A 999 implementation acknowledgement. This ACK replaces a 997 ACK when in a healthcare setting, and can also report issues with standards such as HIPAA compliance.
TA1 Interchange Acknowledgement (atTA1 - 0)A TA1 technical acknowledgement, which confirms the ISA header and IEA footer are valid but does not report on the processing of the contents.

This property is not available at design time.

Data Type

Integer

BuildDOM Property (X12Reader Control)

Specifies how much of the current document should be held in memory.

Syntax

x12readercontrol.BuildDOM[=integer]

Possible Values

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

Default Value

0

Remarks

Set BuildDOM to bdEntireDocument (0) when you need to browse the current document.

Use bdInterchange (1) when parsing large documents to tell the component to only hold an internal object model of the current Interchange being parsed. When this value is used, and a new Interchange is encountered during parsing, the old interchange is cleared from memory. If the input contains a single Interchange, this is equivalent to using bdEntireDocument.

Use bdTranSet (2) when parsing large documents to tell the component to only hold an internal object model of the current transaction being parsed. When this value is used, and a new transaction is encountered during parsing, the old transaction is cleared from memory.

A value of bdNone (3) will tell the component to not save any internal state of the document being parsed, and thus browsing will be unavailable.

This property is not available at design time.

Data Type

Integer

ComponentDataType Property (X12Reader Control)

The type of data contained in the element.

Syntax

x12readercontrol.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 (X12Reader Control)

Specifies whether the element is a simple or composite element.

Syntax

x12readercontrol.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 (X12Reader Control)

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

Syntax

x12readercontrol.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 (X12Reader Control)

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

Syntax

x12readercontrol.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 (X12Reader Control)

The description of the element as specified in the schema.

Syntax

x12readercontrol.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 (X12Reader Control)

The name of the element as specified in the schema.

Syntax

x12readercontrol.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 (X12Reader Control)

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

Syntax

x12readercontrol.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 (X12Reader Control)

The number of controls in the current Element.

Syntax

x12readercontrol.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.

Data Type

Integer

ComponentIndex Property (X12Reader Control)

The index of the current Control.

Syntax

x12readercontrol.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 (X12Reader Control)

The delimiter separating controls.

Syntax

x12readercontrol.DelimiterComponent[=string]

Default Value

":"

Remarks

The delimiter separating components.

In X12Reader, this type is used to hold the delimiters found when parsing the component, while in X12Writer the fields can be set to choose the delimiters that will be used when writing

This property is not available at design time.

Data Type

String

DelimiterElement Property (X12Reader Control)

The delimiter separating elements.

Syntax

x12readercontrol.DelimiterElement[=string]

Default Value

"*"

Remarks

The delimiter separating elements.

In X12Reader, this type is used to hold the delimiters found when parsing the element, while in X12Writer the fields can be set to choose the delimiters that will be used when writing

This property is not available at design time.

Data Type

String

DelimiterRepetition Property (X12Reader Control)

The delimiter separating controls.

Syntax

x12readercontrol.DelimiterRepetition[=string]

Default Value

"^"

Remarks

The delimiter separating components.

In X12Reader, this type is used to hold the delimiters found when parsing the component, while in X12Writer the fields can be set to choose the delimiters that will be used when writing

This property is not available at design time.

Data Type

String

DelimiterSegment Property (X12Reader Control)

The delimiter separating segments.

Syntax

x12readercontrol.DelimiterSegment[=string]

Default Value

"~"

Remarks

The delimiter separating segments.

In X12Reader, this type is used to hold the delimiters found when parsing the segment, while in X12Writer the fields can be set to choose the delimiters that will be used when writing

This property is not available at design time.

Data Type

String

ElementDataType Property (X12Reader Control)

The type of data contained in the element.

Syntax

x12readercontrol.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 (X12Reader Control)

Specifies whether the element is a simple or composite element.

Syntax

x12readercontrol.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 (X12Reader Control)

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

Syntax

x12readercontrol.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 (X12Reader Control)

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

Syntax

x12readercontrol.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 (X12Reader Control)

The description of the element as specified in the schema.

Syntax

x12readercontrol.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 (X12Reader Control)

The name of the element as specified in the schema.

Syntax

x12readercontrol.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 (X12Reader Control)

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

Syntax

x12readercontrol.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 (X12Reader Control)

The number of elements in the current Segment.

Syntax

x12readercontrol.ElementCount

Default Value

0

Remarks

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

This property is read-only.

Data Type

Integer

ElementIndex Property (X12Reader Control)

The index of the current Element.

Syntax

x12readercontrol.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

FGroupAppReceiverCode Property (X12Reader Control)

The name or code of the intended receiver of the transaction set group.

Syntax

x12readercontrol.FGroupAppReceiverCode[=string]

Default Value

""

Remarks

The name or code of the intended receiver of the transaction set group.

This is an alphanumeric field with a value between 2 and 15 characters.

This property is not available at design time.

Data Type

String

FGroupAppSenderCode Property (X12Reader Control)

Code identifying the sender of FunctionalGroup This is an alphanumeric property with a value between 2 and 15 characters long.

Syntax

x12readercontrol.FGroupAppSenderCode[=string]

Default Value

""

Remarks

Code identifying the sender of FunctionalGroup

This is an alphanumeric field with a value between 2 and 15 characters long.

This property is not available at design time.

Data Type

String

FGroupDate Property (X12Reader Control)

The date that the group of transaction sets was prepared.

Syntax

x12readercontrol.FGroupDate[=string]

Default Value

""

Remarks

The date that the group of transaction sets was prepared.

This is a numeric field with a value in the format YYMMDD.

This property is not available at design time.

Data Type

String

FGroupFunctionalIdentifierCode Property (X12Reader Control)

A code identifying the type of transaction sets included in the functional group.

Syntax

x12readercontrol.FGroupFunctionalIdentifierCode[=string]

Default Value

""

Remarks

A code identifying the type of transaction sets included in the functional group.

This is an alphanumeric field with a code value between of 2 characters.

This property is not available at design time.

Data Type

String

FGroupGroupControlNum Property (X12Reader Control)

An identification number assigned by the sender to uniquely identify the group of transaction sets.

Syntax

x12readercontrol.FGroupGroupControlNum[=string]

Default Value

""

Remarks

An identification number assigned by the sender to uniquely identify the group of transaction sets.

This is a numeric field with a value between 1 and 9 digits.

This property is not available at design time.

Data Type

String

FGroupResponsibleAgencyCode Property (X12Reader Control)

A code identifying the issuer of the standard that the transaction set conforms to.

Syntax

x12readercontrol.FGroupResponsibleAgencyCode[=string]

Default Value

""

Remarks

A code identifying the issuer of the standard that the transaction set conforms to.

This is an alphanumeric field with a code value of 1 to 2 characters.

This property is not available at design time.

Data Type

String

FGroupTime Property (X12Reader Control)

The time that the group of transaction sets was prepared.

Syntax

x12readercontrol.FGroupTime[=string]

Default Value

""

Remarks

The time that the group of transaction sets was prepared.

This is a numeric field with a value between 4 and 8 digits in the format HHMM, HHMMSS, or HHMMSSDD. Time should be in the 24-hour format.

This property is not available at design time.

Data Type

String

FGroupVersion Property (X12Reader Control)

Code indicating the version of the X12 standard used to construct the transaction set.

Syntax

x12readercontrol.FGroupVersion[=string]

Default Value

""

Remarks

Code indicating the version of the X12 standard used to construct the transaction set.

This is an alphanumeric field with a code value between 1 and 12 characters.

This property is not available at design time.

Data Type

String

FunctionalGroupCount Property (X12Reader Control)

The number of FunctionalGroups in the current Interchange.

Syntax

x12readercontrol.FunctionalGroupCount

Default Value

0

Remarks

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

This property is read-only.

Data Type

Integer

FunctionalGroupIndex Property (X12Reader Control)

The index of the current FunctionalGroup.

Syntax

x12readercontrol.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

InputData Property (X12Reader Control)

The EDI message, specified as a string.

Syntax

x12readercontrol.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 (X12Reader Control)

The file containing the EDI message.

Syntax

x12readercontrol.InputFile[=string]

Default Value

""

Remarks

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

If the file is not found or cannot be opened, an error will be returned.

Note: If both InputFile and InputData are set, InputData takes precedence.

This property is not available at design time.

Data Type

String

InterchangeAckRequest Property (X12Reader Control)

Code indicating whether an interchange acknowledgment is requested.

Syntax

x12readercontrol.InterchangeAckRequest[=string]

Default Value

""

Remarks

Code indicating whether an interchange acknowledgment is requested.

This is an alphanumeric field with a code value of 1 character, either "0" (no acknowledgment requested) or "1" (acknowledgment requested).

This property is not available at design time.

Data Type

String

InterchangeAuthorizationInfo Property (X12Reader Control)

Information used for additional identification or authorization of the interchange sender or the data in the interchange.

Syntax

x12readercontrol.InterchangeAuthorizationInfo[=string]

Default Value

""

Remarks

Information used for additional identification or authorization of the interchange sender or the data in the interchange.

The type of information is set by the AuthorizationInfoQual field.

This property is not available at design time.

Data Type

String

InterchangeAuthorizationInfoQualifier Property (X12Reader Control)

A code indicating the type of data supplied in Authorization Information property.

Syntax

x12readercontrol.InterchangeAuthorizationInfoQualifier[=string]

Default Value

""

Remarks

A code indicating the type of data supplied in Authorization Information field.

This is an alphanumeric field with a code value of 2 characters.

This property is not available at design time.

Data Type

String

InterchangeDate Property (X12Reader Control)

The date that the Interchange was prepared.

Syntax

x12readercontrol.InterchangeDate[=string]

Default Value

""

Remarks

The date that the Interchange was prepared.

This is a numeric field with a value of 6 digits in the format YYMMDD.

This property is not available at design time.

Data Type

String

InterchangeInterchangeControlNum Property (X12Reader Control)

A control number assigned by the sender to uniquely identify the interchange.

Syntax

x12readercontrol.InterchangeInterchangeControlNum[=string]

Default Value

""

Remarks

A control number assigned by the sender to uniquely identify the interchange.

This is a numeric field with a value of 9 digits.

This property is not available at design time.

Data Type

String

InterchangeInterchangeControlVersionNum Property (X12Reader Control)

A code specifying the version of the X12 standard used to construct the Interchange.

Syntax

x12readercontrol.InterchangeInterchangeControlVersionNum[=string]

Default Value

""

Remarks

A code specifying the version of the X12 standard used to construct the Interchange.

This is an alphanumeric field with a code value 5 characters.

This property is not available at design time.

Data Type

String

InterchangeReceiverID Property (X12Reader Control)

The identification code of the receiver of the transaction set.

Syntax

x12readercontrol.InterchangeReceiverID[=string]

Default Value

""

Remarks

The identification code of the receiver of the transaction set.

This is an alphanumeric field with a value of 15 characters.

This property is not available at design time.

Data Type

String

InterchangeReceiverIDQualifier Property (X12Reader Control)

A code that identifies the format of the receiver ID.

Syntax

x12readercontrol.InterchangeReceiverIDQualifier[=string]

Default Value

""

Remarks

A code that identifies the format of the receiver ID.

This is an alphanumeric field with a code value of 2 characters.

This property is not available at design time.

Data Type

String

InterchangeSecurityInfo Property (X12Reader Control)

Coded security information associated with the Interchange.

Syntax

x12readercontrol.InterchangeSecurityInfo[=string]

Default Value

""

Remarks

Coded security information associated with the Interchange.

The type of information is set by the SecurityInfoQualifier.

This is an alphanumeric field with a value between of 10 characters.

This property is not available at design time.

Data Type

String

InterchangeSecurityInfoQualifier Property (X12Reader Control)

A code indicating the type of data in the Security Information property.

Syntax

x12readercontrol.InterchangeSecurityInfoQualifier[=string]

Default Value

""

Remarks

A code indicating the type of data in the Security Information field.

This is an alphanumeric field with a code value of 2 characters.

This property is not available at design time.

Data Type

String

InterchangeSenderID Property (X12Reader Control)

The identification code of the sender of the transaction set.

Syntax

x12readercontrol.InterchangeSenderID[=string]

Default Value

""

Remarks

The identification code of the sender of the transaction set.

This is an alphanumeric field with a value of 15 characters.

This property is not available at design time.

Data Type

String

InterchangeSenderIDQualifier Property (X12Reader Control)

A code that identifies the format of the sender ID.

Syntax

x12readercontrol.InterchangeSenderIDQualifier[=string]

Default Value

""

Remarks

A code that identifies the format of the sender ID.

This is an alphanumeric field with a code value of 2 characters.

This property is not available at design time.

Data Type

String

InterchangeTime Property (X12Reader Control)

The time that the Interchange sets was prepared.

Syntax

x12readercontrol.InterchangeTime[=string]

Default Value

""

Remarks

The time that the Interchange sets was prepared.

This is a numeric field with a value in the format HHMM.

This property is not available at design time.

Data Type

String

InterchangeUsageIndicator Property (X12Reader Control)

Code to indicate whether the interchange is a test or production.

Syntax

x12readercontrol.InterchangeUsageIndicator[=string]

Default Value

""

Remarks

Code to indicate whether the interchange is a test or production.

This is an alphanumeric field with a code value of 1 character.

This property is not available at design time.

Data Type

String

InterchangeCount Property (X12Reader Control)

The number of Interchanges in the document.

Syntax

x12readercontrol.InterchangeCount

Default Value

0

Remarks

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

This property is read-only.

Data Type

Integer

InterchangeIndex Property (X12Reader Control)

The index of the current Interchange.

Syntax

x12readercontrol.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

Loop Property (X12Reader Control)

Specifies the loop to load segments from.

Syntax

x12readercontrol.Loop[=string]

Default Value

""

Remarks

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

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

reader.Loop = "N1Loop[2]";

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

reader.Loop = ""AK2Loop[2].AK3Loop[1]"; That can be repeated if a loop is nested more than one level deep.

This property is not available at design time.

Data Type

String

SegmentOptional Property (X12Reader Control)

Specifies whether the segment is required or optional.

Syntax

x12readercontrol.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 (X12Reader Control)

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

Syntax

x12readercontrol.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 (X12Reader 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

x12readercontrol.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 (X12Reader Control)

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

Syntax

x12readercontrol.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 (X12Reader Control)

The number of segments in the current TransactionSet.

Syntax

x12readercontrol.SegmentCount

Default Value

0

Remarks

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

This property is read-only.

Data Type

Integer

SegmentIndex Property (X12Reader Control)

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

Syntax

x12readercontrol.SegmentIndex[=integer]

Default Value

1

Remarks

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, TransactionSetIndex and SegmentIndex to navigate to specific Segment within the parsed document.

This property is not available at design time.

Data Type

Integer

TransSetImpConventionReference Property (X12Reader Control)

Reference used to identify the implementation convention.

Syntax

x12readercontrol.TransSetImpConventionReference[=string]

Default Value

""

Remarks

Reference used to identify the implementation convention.

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

This property is not available at design time.

Data Type

String

TransSetTransactionSetControlNum Property (X12Reader Control)

The unique transaction set control number assigned for a transaction set.

Syntax

x12readercontrol.TransSetTransactionSetControlNum[=string]

Default Value

""

Remarks

The unique transaction set control number assigned for a transaction set.

This is an alphanumeric field with a value between 4 and 9 characters long.

This property is not available at design time.

Data Type

String

TransSetTransactionSetIDCode Property (X12Reader Control)

The identifier code for the transaction set.

Syntax

x12readercontrol.TransSetTransactionSetIDCode[=string]

Default Value

""

Remarks

The identifier code for the transaction set.

This is an alphanumeric field with a code value of 3 characters long.

This property is not available at design time.

Data Type

String

TransactionSetCount Property (X12Reader Control)

The number of TransactionSets in the current FunctionalGroup.

Syntax

x12readercontrol.TransactionSetCount

Default Value

0

Remarks

This property contains the count of TransactionSets in the current FunctionalGroup.

This property is read-only.

Data Type

Integer

TransactionSetIndex Property (X12Reader Control)

The current TransactionSet index.

Syntax

x12readercontrol.TransactionSetIndex[=integer]

Default Value

1

Remarks

This property contains the index of the current TransactionSet within the current FunctionalGroup.

This property is not available at design time.

Data Type

Integer

ValidateOnParse Property (X12Reader Control)

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

Syntax

x12readercontrol.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

ValidationErrorCount Property (X12Reader Control)

The number of records in the ValidationError arrays.

Syntax

x12readercontrol.ValidationErrorCount

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at ValidationErrorCount - 1.

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

Data Type

Integer

ValidationErrorColumn Property (X12Reader Control)

The column number where the error occurred.

Syntax

x12readercontrol.ValidationErrorColumn(ValidationErrorIndex)

Default Value

0

Remarks

The column number where the error occurred.

The ValidationErrorIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ValidationErrorCount property.

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

Data Type

Integer

ValidationErrorComponentIndex Property (X12Reader Control)

This property holds the position of the control element where the error occurred.

Syntax

x12readercontrol.ValidationErrorComponentIndex(ValidationErrorIndex)

Default Value

1

Remarks

This property holds the position of the component element where the error occurred.

The ValidationErrorIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ValidationErrorCount property.

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

Data Type

Integer

ValidationErrorElementIndex Property (X12Reader Control)

This property holds the position of the element where the error occurred.

Syntax

x12readercontrol.ValidationErrorElementIndex(ValidationErrorIndex)

Default Value

1

Remarks

This property holds the position of the element where the error occurred.

The ValidationErrorIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ValidationErrorCount property.

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

Data Type

Integer

ValidationErrorErrorCode Property (X12Reader Control)

The ErrorCode property contains the type of error encountered.

Syntax

x12readercontrol.ValidationErrorErrorCode(ValidationErrorIndex)

Default Value

"0"

Remarks

The ValidationErrorErrorCode property contains the type of error encountered.

The ValidationErrorIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ValidationErrorCount property.

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

Data Type

String

ValidationErrorErrorMessage Property (X12Reader Control)

ErrorMessage is a textual description of the error.

Syntax

x12readercontrol.ValidationErrorErrorMessage(ValidationErrorIndex)

Default Value

""

Remarks

ValidationErrorErrorMessage is a textual description of the error.

The ValidationErrorIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ValidationErrorCount property.

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

Data Type

String

ValidationErrorErrorType Property (X12Reader Control)

Indicates the level of the document where the error was encountered.

Syntax

x12readercontrol.ValidationErrorErrorType(ValidationErrorIndex)

Default Value

0

Remarks

Indicates the level of the document where the error was encountered. Possible values include:

1Interchange
2Functional group
3Transaction set
4Segment
5Element

The ValidationErrorIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ValidationErrorCount property.

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

Data Type

Integer

ValidationErrorFGroupIndex Property (X12Reader Control)

This property holds the position of the functional group where the error occurred.

Syntax

x12readercontrol.ValidationErrorFGroupIndex(ValidationErrorIndex)

Default Value

1

Remarks

This property holds the position of the functional group where the error occurred.

The ValidationErrorIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ValidationErrorCount property.

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

Data Type

Integer

ValidationErrorInterchangeIndex Property (X12Reader Control)

This property holds the position of the interchange where the error occurred.

Syntax

x12readercontrol.ValidationErrorInterchangeIndex(ValidationErrorIndex)

Default Value

1

Remarks

This property holds the position of the interchange where the error occurred.

The ValidationErrorIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ValidationErrorCount property.

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

Data Type

Integer

ValidationErrorLine Property (X12Reader Control)

The line number where the error occurred.

Syntax

x12readercontrol.ValidationErrorLine(ValidationErrorIndex)

Default Value

0

Remarks

The line number where the error occurred.

The ValidationErrorIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ValidationErrorCount property.

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

Data Type

Integer

ValidationErrorPosition Property (X12Reader Control)

This property holds the byte position in the EDI stream where the error occurred.

Syntax

x12readercontrol.ValidationErrorPosition(ValidationErrorIndex)

Default Value

0

Remarks

This property holds the byte position in the EDI stream where the error occurred.

The ValidationErrorIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ValidationErrorCount property.

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

Data Type

Long64

ValidationErrorSegmentIndex Property (X12Reader Control)

This property is the index of the segment where the error occurred.

Syntax

x12readercontrol.ValidationErrorSegmentIndex(ValidationErrorIndex)

Default Value

1

Remarks

This property is the index of the segment where the error occurred.

The ValidationErrorIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ValidationErrorCount property.

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

Data Type

Integer

ValidationErrorSegmentTag Property (X12Reader Control)

This property specifies the tag name of the segment where the error occurred.

Syntax

x12readercontrol.ValidationErrorSegmentTag(ValidationErrorIndex)

Default Value

""

Remarks

This property specifies the tag name of the segment where the error occurred.

The ValidationErrorIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ValidationErrorCount property.

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

Data Type

String

ValidationErrorTransactionSetIndex Property (X12Reader Control)

This property holds the position of the message where the error occurred.

Syntax

x12readercontrol.ValidationErrorTransactionSetIndex(ValidationErrorIndex)

Default Value

1

Remarks

This property holds the position of the message where the error occurred.

The ValidationErrorIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ValidationErrorCount property.

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

Data Type

Integer

Config Method (X12Reader Control)

Sets or retrieves a configuration setting.

Syntax

x12readercontrol.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 (X12Reader Control)

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

Syntax

x12readercontrol.GenerateAck 

Remarks

After parsing a TransactionSet, 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 (X12Reader Control)

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

Syntax

x12readercontrol.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 loops (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 loop (as in the Loop property), followed by a segment tag and an index for the element position within the segment, each separated by a ".":

reader.GetElementValue("N1Loop[2].N4.4");

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

reader.GetElementValue("AK2Loop[2].AK3Loop[1].AK4.1.1");

LoadSchema Method (X12Reader Control)

Loads schema information from a file or string data.

Syntax

x12readercontrol.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 (X12Reader Control)

Parse the EDI document and fire parsing events.

Syntax

x12readercontrol.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 (X12Reader Control)

Sets the control to its initial state.

Syntax

x12readercontrol.Reset 

Remarks

When called the control clears all inputs and outputs, and resets all properties to their default values.

SchemaCode Method (X12Reader Control)

Defines a code value within a list of codes.

Syntax

x12readercontrol.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 (X12Reader Control)

Defines a list of codes.

Syntax

x12readercontrol.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 (X12Reader Control)

Defines a composite element.

Syntax

x12readercontrol.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 (X12Reader Control)

Defines a simple element.

Syntax

x12readercontrol.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 (X12Reader Control)

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

Syntax

x12readercontrol.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 (X12Reader Control)

Ends a schema definition.

Syntax

x12readercontrol.SchemaEnd 

Remarks

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

SchemaGroup Method (X12Reader Control)

Defines a group of segments.

Syntax

x12readercontrol.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 (X12Reader Control)

Defines a message.

Syntax

x12readercontrol.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 (X12Reader Control)

Defines a segment.

Syntax

x12readercontrol.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 (X12Reader Control)

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

Syntax

x12readercontrol.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 (X12Reader Control)

Starts a schema definition.

Syntax

x12readercontrol.SchemaStart SchemaId

Remarks

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

Validate Method (X12Reader Control)

Validate the EDI document and warn about any errors encountered.

Syntax

x12readercontrol.Validate 

Remarks

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

EndFunctionalGroup Event (X12Reader Control)

Fires at the end of a functional group while parsing.

Syntax

Sub x12readercontrol_EndFunctionalGroup(Tag As String, TransactionCount As Integer, ControlNumber As String)

Remarks

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

EndInterchange Event (X12Reader Control)

Fires at the end of a interchange while parsing.

Syntax

Sub x12readercontrol_EndInterchange(Tag As String, GroupCount As Integer, ControlNumber As String)

Remarks

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

EndLoop Event (X12Reader Control)

Fires at the end of a loop while parsing.

Syntax

Sub x12readercontrol_EndLoop(Name As String, Index As Integer)

Remarks

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

EndTransactionSet Event (X12Reader Control)

Fires at the end of a transaction set while parsing.

Syntax

Sub x12readercontrol_EndTransactionSet(Tag As String, SegmentCount As Integer, ControlNumber As String)

Remarks

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

Error Event (X12Reader Control)

Fires when a parsing error occurs.

Syntax

Sub x12readercontrol_Error(ErrorCode As Integer, Description As String)

Remarks

This event fires when the control encounters a parsing error while processing a document.

ResolveSchema Event (X12Reader Control)

Fires to request schema information for a specific transaction set.

Syntax

Sub x12readercontrol_ResolveSchema(VersionNumber As String, TransactionSetIDCode As String)

Remarks

LoadSchema can be called from within this event to load the schema information for the specified transaction set.

Segment Event (X12Reader Control)

Fires at the end of a Segment while parsing.

Syntax

Sub x12readercontrol_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 with the Parse method. The parameters provide information about the segment that was just parsed: Tag: The segment tag (e.g., "ISA", "GS", "ST", etc.).

SchemaPath: The schema path for the segment, if schema information is available.

Optional: A boolean indicating whether the segment is optional (true) or required (false) according to the schema.

ElementCount: The number of elements in the segment.

SchemaIndex: The index of the segment in the schema, if schema information is available.

SegmentIndex: The index of the segment within the current transaction set.

MaxCount: The maximum number of times this segment can occur in the current context, according to the schema.

Path: The full path to the segment within the message structure.

StartFunctionalGroup Event (X12Reader Control)

Fires at the beginning of a functional group while parsing.

Syntax

Sub x12readercontrol_StartFunctionalGroup(Tag As String, AppSenderCode As String, AppReceiverCode As String, DateTime As String, ControlNumber As String)

Remarks

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

StartInterchange Event (X12Reader Control)

Fires at the beginning of an interchange while parsing.

Syntax

Sub x12readercontrol_StartInterchange(Tag As String, SenderID As String, ReceiverID As String, DateTime As String, ControlNumber As String)

Remarks

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

StartLoop Event (X12Reader Control)

Fires at the beginning of a loop while parsing a transaction set.

Syntax

Sub x12readercontrol_StartLoop(Name As String, Index As Integer, MaxCount As Integer, Path As String)

Remarks

This event fires when the control encounters the start of a loop while parsing a transaction set.

StartTransactionSet Event (X12Reader Control)

Fires at the beginning of a transaction set while parsing.

Syntax

Sub x12readercontrol_StartTransactionSet(Tag As String, VersionNumber As String, TransactionSetIDCode As String, ControlNumber As String, SchemaLoaded As Boolean)

Remarks

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

ValidateWarning Event (X12Reader Control)

Fires to warn about validation errors.

Syntax

Sub x12readercontrol_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 (X12Reader 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.

X12Reader Config Settings

InputFormat:   The format of the input document.

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

0 (default)X12
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 (X12Reader Control)

X12Reader 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.
21205    Encountered an error while validating the ISA segment.