A message definition is defined by its fields and containers. A field models a data element, for example, a postal code. A container can contain fields and other containers.
The message definition has a .wfm extension.
The message definition opens in the Message Definition editor.
The field is added to the tree. The Field Properties section displays default field properties.
When you drag the field, a horizontal line appears, indicating the new location.
In each container, the Repeat Type, Node Type, and Termination Type properties have subproperties, which are described in Subproperties column.
Field property | Options | Subproperties | |
---|---|---|---|
Name | For example, ZIP
code.
Note: The name must conform to the
naming conventions for XML elements and the
naming conventions for Java classes.
|
||
Optional | Select whether or not this field must occur in each message: | ||
True | This field can be present or absent from a message. | ||
False | Each message has at least one of these fields. | ||
Repeat Type | Select the rule that determines how many fields of this type are expected to occur in each message: | ||
None | This field always occurs once and only once. | ||
Unbounded | For each message, this field can occur any number of times or not at all. | ||
Fixed Count | This field occurs X number of times in each message, where X = Instances. | ||
Instances | Enter the fixed number of times this field occurs in series, for example, 4. | ||
Field Driven | This field appears X number of times, where X = the positive integer value of the field specified by Instance Count Field. | ||
Instance Count Field | Select the field, which you must first create
elsewhere in this message definition, containing the integer value that
specifies how many times this field occurs in series, for example,
\MsgDef01\SomeContainer\Iterations. This value can vary for each message.
Note: Before you can select a Repeat Count Field, you
must create a suitable numeric field in the message definition, for example,
IterationsOfSomeOtherField. The Repeat Count Field can be located anywhere in
the message definition.
|
||
Range | This field may appear any number of times between and including X and Y , where X is the value of Min and Y is the value of Max. | ||
Min | Enter the minimum number of times this field can occur in series, for example, 1. | ||
Max | Enter the maximum number of times this field can occur in series, for example, 32. | ||
Node Type | Select whether the node consists of data, a literal tag, or both, and if the data conforms to a specified length: | ||
Data Only | The data occurs by itself with no tag, for example, 90210. | ||
Tag & Data | The data is
preceded by a tag identifying the field, for example, TAGZIP:90210.
After you select the Tag Data option, set its subproperties: |
||
Tag Value | Click ... to define the tag that identifies this field. | ||
Tag, Length & Data | The data is
preceded by a tag identifying the field and a numeric value indicating the
fixed length of the data.
After you select the Tag Length Data option, set its subproperties: |
||
Tag Value | Click ... to define the tag that identifies this field. | ||
Unit | Select Character if Length is entered in characters or select Byte if Length is entered in bytes. | ||
Data Type | Select the datatype of the data element that defines the field length.. | ||
Termination Type | Select the method used to identify the end of the length data using the Length Termination Type table. | ||
Length, Tag & Data | The data is
preceded by a numeric value indicating the fixed length of the data and a tag
identifying the field.
After you select the Length Tag Data option, set its subproperties: |
||
Unit | Select Character if Length is entered in characters or select Byte if Length is entered in bytes. | ||
Data Type | Select the format of the data element that defines the field length. | ||
Termination Type | Select the method used to identify the end of the length data using the Length Termination Type table. | ||
Tag Value | Click ellipsis ... to define the tag that identifies this field. | ||
Length & Data | The data is
preceded by a numeric value indicating the fixed length of the data.
After you select the Length Data option, set its subproperties: |
||
Unit | Select Character if Length is entered in characters or select Byte if Length is entered in bytes. | ||
Data Type | Select the format of the data element that defines the field length. | ||
Termination Type | Select the method used to identify the end of the length data using the Length Termination Type table. | ||
Literal | This field
contains no data, only a literal value, for example, USDOLLARS.
After you select the Literal option, set its subproperty: |
||
Literal Value | Click ... to define the string or binary
constant tag for this field.
Note: The literal value of a literal field must be a
valid value for the literal field's datatype. For example, a literal field that
has a binary literal value must have a binary datatype.
|
||
Data Type | Select the datatype of the data element. | ||
Termination Type | Select an option to specify how the end of the field is identified: | ||
End of Container | The field accepts input until the end of its container or the end of the message. | ||
Delimiter | The end of the field is marked by a character string or binary sequence: | ||
Delimiter Value | For example, a semicolon ; | ||
Fixed Length | For all message instances, the field length is defined by an integer value. | ||
Length | For example, 16. | ||
Unit | Select Character if Length is entered in characters or select Byte if Length is entered in bytes. | ||
Minimum Length & White Space | A minimum number of characters are read from the field, continuing until whitespace data is read, including spaces, carriage returns, line feeds, horizontal tabs, or vertical tabs. | ||
Length | For example, 16. | ||
Unit | Select Character if Length is entered in characters or select Byte if Length is entered in bytes. | ||
Minimum Length & Delimiter | A minimum number of characters are read from the field, continuing until a delimiter is reached. | ||
Delimiter Value | For example, a semicolon ; | ||
Length | Enter the minimum length of the field, for example, 96. | ||
Unit | Select Character if Length is entered in characters or select Byte if Length is entered in bytes. | ||
White Space | The end of the field is marked by whitespace data, including spaces, carriage returns, line feeds, horizontal tabs, or vertical tabs. | ||
Custom Parse Extension | Click the
ellipsis to select a JAR and class to perform custom
post-parse manipulation of this field at runtime. By definition, this routine
is called after any initial parsing of the field.
The custom class must reside in a JAR that you have developed and imported to the CustomClasses folder in your project. |
||
Custom Field Parser | Click the ellipsis
to select a JAR and class to perform a
custom parse routine on this field at runtime. Additionally, you can write a
Custom Parse Extension (see above) to perform post-parse operations on the same
field.
The custom class must reside in a JAR that you have developed and imported to the CustomClasses folder in your project. |
||
Custom Field Serializer | Click the ellipsis
to select a JAR and class to perform a
custom serialization routine on this field at runtime.
The custom class must reside in a JAR that you have developed and imported to the CustomClasses folder in your project. |
Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com
Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.