While editing a message definition, you build its structure as a node model. A message definition can contain two types of nodes: fields and containers. Fields represent data, for example, a postal code. Containers can hold any combination of other containers and fields. After you add fields and containers to a message definition, you can copy and paste them or change their order at any time by dragging and dropping.
Right-click the message (root) node or a container and select New Child|Field.
A new field appears under the selected container or message node.
To move the field to another part of the message definition, drag and drop it to the correct location.
In the Field Properties pane, complete the information using the following table.
When you select options for the Repeat Type, Node Type, DataType, and Termination Type fields, most selections reveal one or more subfields that you must complete as well. For explanations of an option's subproperties, click its Field Properties link in the following table.
For any given field, you must set the Unit property to Byte if the following conditions are both true:
The field's Data Type property is set to Binary.
The field's Node Type property is set to one of the following:
Tag Length & Data
Length, Tag & Data
Length & Data
Field Properties
Field Properties | Options | Subproperties and Explanation | |
---|---|---|---|
Name | For example, ZIP code. NoteThe name must conform to the naming conventions for XML elements and the naming conventions for Java classes. For more information, see Troubleshooting Message Definition Objects. | ||
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. NoteBefore 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. Example: 90210 | ||
Tag & Data | The data is preceded by a tag identifying the field. 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 Byte if Length is entered in bytes. NoteYou must set the Unit property to Byte if the following conditions are both true:
| ||
Data Type | Select the datatype of the data element that defines the field length. For complete definitions, refer to the list of supported datatypes. | ||
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 Byte if Length is entered in bytes. | ||
Data Type | Select the format of the data element that defines the field length. For complete definitions, refer to the list of supported datatypes. | ||
Termination Type | Select the method used to identify the end of the length data using the Length Termination Type table. | ||
Tag Value | Click . . . 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 Byte if Length is entered in bytes. | ||
Data Type | Select the format of the data element that defines the field length. For complete definitions, refer to the list of supported datatypes. | ||
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. 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. NoteThe 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. For complete definitions, refer to the list of supported datatypes. | ||
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 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, which may include spaces, carriage returns, line feeds, horizontal tabs, or vertical tabs. | ||
Length | For example: 16. | ||
Unit | Select Character if Length is entered in characters or 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 Byte if Length is entered in bytes. | ||
White Space | The end of the field is marked by whitespace data, which can include spaces, carriage returns, line feeds, horizontal tabs, or vertical tabs. | ||
Custom Parse Extension | Click
The custom class must reside in a JAR that you have developed and imported to the CustomClasses folder in your Message Designer project. | ||
Custom Field Parser | Click
The custom class must reside in a JAR that you have developed and imported to the CustomClasses folder in your Message Designer project. | ||
Custom Field Serializer | Click
The custom class must reside in a JAR that you have developed and imported to the CustomClasses folder in your Message Designer project. |
To make copies of this field, right-click it and select Copy, then Paste.
When finished, select File|Save.
Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com