GetSQLCode node


The GetSQLCode node icon

This page contains information on:

The GetSQLCode node extracts the SQLCODE value from the exception list of the current message and copies it to the specified location in the output message.

The GetSQLCode node has one input terminal called in and three output terminals, out, notFound and failure.  When a message is received on the input terminal, the node searches the exception list looking for a database error message containing the keyword 'SQLSTATE'.  If the keyword is found, the SQLCODE value is extracted, a new message is created and the value is copied into the location specified by the CopyValueTo attribute.  The new message is then propagated to the out terminal.  If no SQLCODE value is found in the input message exception list, the input message is propagated to the notFound terminal.  Any other errors result in the input message being propagated to the failure terminal and a message is written to the MQSI V2 message log.

Node terminals

The GetSQLCode node provides the following terminals:
 
 
in The input terminal that accepts a message for processing by the node.
out The output terminal to which the new message is propagated if the SQLCODE value is  successfully extracted and stored in the new message.
failure The output terminal to which the original message is propagated if any errors are encountered during processing.
notFound The output terminal to which the original message is propagated if the exception list does not contain a SQLCODE value.

Configuring the GetSQLCode node

When you have put an instance of the GetSQLCode node into a message flow you can configure it. Right click on the node in the Message Flow Definition pane and select Properties. Specify the name of the syntax element into which you would like the SQLCODE value to be stored.  The name must begin with 'Root.'.  If the element does not exist, the GetSQLCode node will attempt to create it, in which case it will be initialised to a NAME-VALUE type element and its data type will be CHAR for an XML message and INTEGER for a non-XML message.

GetSQLCode node properties

CopyValueTo   Mandatory value specifying the location in the new message into which the SQLCODE value will be stored.  The value specified must begin with 'Root.'.  For XML format messages, the XML qualifier can be omitted.  Thus, 'Root.XML.outer.tag5' is equivalent to 'Root.outer.tag5'.

For XML format messages, the SQLCODE value is converted into a character string before storing.

For non-XML messages specifying an existing location the SQLCODE is always stored as an INTEGER data type.



(C) IBM Corporation 2001. All Rights Reserved