UniBasic Commands Reference - Rocket Software
UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software
amReceiveMsg Syntax amReceiveMsg(hSession,receiverName,policyName, selMsgName, maxMsgLen, dataLen, data, rcvMsgName, reasonCode) Note: This function is case-sensitive. If you want it to be case-insensitive, you must compile your programs using the BASIC command with the -i option. Description 1-90 UniBasic Commands Reference The amReceiveMsg function receives a message sent by the amSendMsg function. For detailed information about amReceiveMsg, see UniBasic Extensions. Parameters The following table describes each parameter of the syntax. Parameter Description hSession The session handle returned by amInitialize. [IN] receiverName The name of a receiver service. If you do not specify a name, UniData uses the system default receiver name. [IN] policyName The name of a policy. If you do not specify a name, UniData uses the system default policy name. [IN] selMsgName Optional parameter specifying the name of a message object containing information (such as a Correl ID) that UniData uses to retrieve the required message fromthe queue. See UniBasic Extensions for detailed information about this parameter. [IN] maxMsgLen The maximum message length the application will accept. Specify as - 1 to accept messages of any length. See UniBasic Extensions for detailed information about this parameter. [IN] amReceiveMsg Parameters
Parameter Description dataLen The length of the retrieved message data, in bytes. Specify ““ (null) if not required. [OUT] data The received message data. [OUT] rcvMsgName The name of a message object for the retrieved message. You can specify ““ (null) for this parameter, in which case UniData uses the system default name (constant AMSD_RCV_MSG). See UniBasic Extensions for detailed information about this parameter. [IN] reasonCode Holds an AMI reason code when the function returns a status indicating an AMI warning or an AMI error occurred. You can use the AMI reason code to obtain more information about the cause of the warning or error. See the MQSeries Application Messaging Interface manual for a list of AMI reason codes and their descriptions. [OUT] The following table describes the status of each return code. Return Code Status amReceiveMsg Parameters (continued) 0 – AMCC_SUCCESS Function complete successfully. 1 – AMCC_WARNING A warning was returned from AMI. The reasonCode output parameter contains an AMI reason code with further details about the warning. 2 – AMCC_FAILED An error was returned from AMI. The reasonCode output parameter contains an AMI reason code with further details about the error. Other A non-AMI error occurred. amReceiveMsg Return Codes amReceiveMsg 1-91
- Page 33 and 34: $UNDEFINE Syntax $UNDEFINE var Desc
- Page 35 and 36: * Syntax expr * expr Synonyms !, RE
- Page 37 and 38: *= Syntax var *= expr Description T
- Page 39 and 40: += Syntax var += expr Description T
- Page 41 and 42: -= Syntax var -= expr Description T
- Page 43 and 44: = Syntax var /= expr Description Th
- Page 45 and 46: ^ Syntax expr1^expr2 Synonym ** Des
- Page 47: < is a synonym for the LT (less tha
- Page 50 and 51: = 1-55 UniBasic Commands Reference
- Page 52 and 53: =< 1-57 UniBasic Commands Reference
- Page 54 and 55: 1-59 UniBasic Commands Reference >
- Page 56 and 57: @ Syntax @(col.expr [,row.expr]) @(
- Page 58 and 59: 1-63 UniBasic Commands Reference Op
- Page 60 and 61: Examples In the following example,
- Page 62 and 63: [] Syntax 1-67 UniBasic Commands Re
- Page 64 and 65: {} {} is a synonym for the CALCULAT
- Page 66 and 67: Note: You can use the ECL ON.ABORT
- Page 68 and 69: ABS Syntax ABS(expr) Description Th
- Page 70 and 71: Parameter Description 1-76 UniBasic
- Page 72 and 73: ACTIVATEKEY Syntax ACTIVATEKEY , [
- Page 74 and 75: STATUS Code Example 1-80 UniBasic C
- Page 76 and 77: Parameters 1-82 UniBasic Commands R
- Page 78 and 79: Parameter Description format 1 - PE
- Page 80 and 81: 1-86 UniBasic Commands Reference Re
- Page 82 and 83: amInitialize Syntax 1-88 UniBasic C
- Page 86 and 87: amReceiveRequest Syntax amReceiveRe
- Page 88 and 89: amSendMsg Syntax 1-94 UniBasic Comm
- Page 90 and 91: amSendRequest Syntax amSendRequest(
- Page 92 and 93: amSendResponse Syntax amSendRespons
- Page 94 and 95: amTerminate Syntax amTerminate(hSes
- Page 96 and 97: analyzeCertificate Syntax analyzeCe
- Page 98 and 99: AND Syntax expr1 AND expr2 Synonym
- Page 100 and 101: ASIN Syntax ASIN(expr) Description
- Page 102 and 103: Related Command UniData TERM - For
- Page 104 and 105: BITAND Syntax BITAND(num.expr1,num.
- Page 106 and 107: BITOR Syntax BITOR(num.expr1,num.ex
- Page 108 and 109: BPIOCP Syntax BPIOCP Description Th
- Page 110 and 111: BPIOCPN Syntax BPIOCPN Description
- Page 112 and 113: BREAK Syntax BREAK [KEY] {ON | OFF
- Page 114 and 115: BYTELEN Syntax BYTELEN (string) Des
- Page 116 and 117: Example In the following example, t
- Page 118 and 119: Parameters The following table desc
- Page 120 and 121: CALLC Syntax CALLC c.sub.name [(arg
- Page 122 and 123: CASE Syntax BEGIN CASE CASE express
- Page 124 and 125: In the next example, the program se
- Page 126 and 127: Related Commands UniBasic CATS, SPL
- Page 128 and 129: CHAIN Syntax CHAIN "str.expr" Descr
- Page 130 and 131: CHANGE Syntax CHANGE(string, old.su
- Page 132 and 133: CHAR Syntax CHAR(expr) Description
Parameter Description<br />
dataLen The length of the retrieved message data, in bytes. Specify ““ (null) if<br />
not required. [OUT]<br />
data The received message data. [OUT]<br />
rcvMsgName The name of a message object for the retrieved message. You can<br />
specify ““ (null) for this parameter, in which case UniData uses the<br />
system default name (constant AMSD_RCV_MSG). See <strong>UniBasic</strong><br />
Extensions for detailed information about this parameter. [IN]<br />
reasonCode Holds an AMI reason code when the function returns a status indicating<br />
an AMI warning or an AMI error occurred. You can use the AMI reason<br />
code to obtain more information about the cause of the warning or error.<br />
See the MQSeries Application Messaging Interface manual for a list of<br />
AMI reason codes and their descriptions. [OUT]<br />
The following table describes the status of each return code.<br />
Return Code Status<br />
amReceiveMsg Parameters (continued)<br />
0 – AMCC_SUCCESS Function complete successfully.<br />
1 – AMCC_WARNING A warning was returned from AMI. The reasonCode output<br />
parameter contains an AMI reason code with further details<br />
about the warning.<br />
2 – AMCC_FAILED An error was returned from AMI. The reasonCode output<br />
parameter contains an AMI reason code with further details<br />
about the error.<br />
Other A non-AMI error occurred.<br />
amReceiveMsg Return Codes<br />
amReceiveMsg 1-91