FIELDTYPE returns an integer representing the type of the field
identified by source_field_reference; this is the type of the field,
not the data type of the field that the parameter identifies. If the parameter
identifies a nonexistent entity, NULL is returned.
The mapping of integer
values to field types is not published, and might change from release to release.
Compare the results of the FIELDTYPE function with named field types.
The named field types that you can use in this context
are listed below.
Note: The first four are domain independent; the XML.* types
are applicable to the XML, XMLNS, JMSMap, and JMSStream domains, except for
XML.Namespace which is specific to the XMLNS domain.
You must
use these types with the capitalization shown:
- Name
- Value
- NameValue
- MQRFH2.BitStream
- XML.AsisElementContent
- XML.Attribute
- XML.AttributeDef
- XML.AttributeDefDefaultType
- XML.AttributeDefType
- XML.AttributeDefValue
- XML.AttributeList
- XML.BitStream
- XML.CDataSection
- XML.Comment
- XML.Content
- XML.DocTypeComment
- XML.DocTypeDecl
- XML.DocTypePI
- XML.DocTypeWhiteSpace
- XML.Element
- XML.ElementDef
- XML.Encoding
- XML.EntityDecl
- XML.EntityDeclValue
- XML.EntityReferenceStart
- XML.EntityReferenceEnd
- XML.ExternalEntityDecl
- XML.ExternalParameterEntityDecl
- XML.ExtSubset
- XML.IntSubset
- XML.NamespaceDecl
- XML.NotationDecl
- XML.NotationReference
- XML.ParameterEntityDecl
- XML.ParserRoot
- XML.ProcessingInstruction
- XML.PublicId
- XML.RequestedDomain
- XML.Standalone
- XML.SystemId
- XML.UnparsedEntityDecl
- XML.Version
- XML.WhiteSpace
- XML.XmlDecl
- XMLNSC.Attribute
- XMLNSC.BitStream
- XMLNSC.CDataField
- XMLNSC.CDataValue
- XMLNSC.Comment
- XMLNSC.DocumentType
- XMLNSC.DoubleAttribute
- XMLNSC.DoubleEntityDefinition
- XMLNSC.EntityDefinition
- XMLNSC.EntityReference
- XMLNSC.Field
- XMLNSC.Folder
- XMLNSC.HybridField
- XMLNSC.HybridValue
- XMLNSC.PCDataField
- XMLNSC.PCDataValue
- XMLNSC.ProcessingInstruction
- XMLNSC.SingleAttribute
- XMLNSC.SingleEntityDefinition
- XMLNSC.Value
- XMLNSC.XmlDeclaration
You can also use this function to determine whether a
field in a message exists. To do this, use the form:
FIELDTYPE(SomeFieldReference) IS NULL
If the field exists, an integer value is returned to the function
that indicates the field type (for example, string). When this is compared
to NULL, the result is FALSE. If the field does not exist, NULL is returned
and therefore the result is TRUE. For example:
IF FIELDTYPE(InputRoot.XML.Message1.Name)
IS NULL THEN
// Name field does not exist, take error
action....
... more ESQL ...
ELSE
// Name field does exist, continue....
... more ESQL ...
END IF