{
  "synLogic": "int $ret \u003d $api($1, $2, $3, $4, $5);",
  "help": "The ns_ibmmq_get_msg() function to get messages from a JMS queue/topic using a connection taken using the get connection API. This function returns an error code and an error message in case of any errors.",
  "notes": "",
  "returns": "\nReturns an integer value that indicates the status of the function call. \nA value less than zero indicates an error, and a value greater than or equal to zero indicates success.",
  "arguments": "\u003ctable class\u003d\"newGuiTable\" style\u003d\"width:100%\" \u003e \u003ctr\u003e         \u003cth\u003eArgument\u003c/th\u003e     \u003cth\u003eDescription\u003c/th\u003e     \u003c/tr\u003e              \u003ctr\u003e    \u003ctd\u003eJPCID\u003c/td\u003e     \u003ctd\u003e  This parameter specifies the JMS Connection ID. It is returned by the ns_ibmmq_get_connection() API    \u003c/td\u003e     \u003c/tr\u003e  \u003ctr\u003e       \u003ctd\u003eMessage\u003c/td\u003e     \u003ctd\u003e  This parameter is a pointer to the buffer that receives the message content.    \u003c/td\u003e     \u003c/tr\u003e     \u003ctr\u003e    \u003ctd\u003eMessage Length\u003c/td\u003e     \u003ctd\u003e  This parameter specifies the maximum length of the message that can be received. \u003c/td\u003e     \u003c/tr\u003e  \u003ctr\u003e    \u003ctd\u003eTransaction Name\u003c/td\u003e     \u003ctd\u003e  It starts a transaction with the given name. If not specified, no transaction is started.   \u003c/td\u003e     \u003c/tr\u003e   \u003ctr\u003e    \u003ctd\u003eError Message\u003c/td\u003e     \u003ctd\u003e  This parameter is a pointer to a buffer that receives the error message in case of any errors. The maximum length of the error message is 1014 characters.  \u003c/td\u003e     \u003c/tr\u003e   \u003c/table\u003e",
  "parameterization": "",
  "name": "ns_ibmmq_get_msg",
  "syntax": "int ns_ibmmq_get_msg( int jpcid, char *msg, int msg_len, char *transaction_name, char *error_msg)",
  "javaSyntax": "int ns_ibmmq_get_msg( int jpcid, char *msg, int msg_len, char *transaction_name, char *error_msg)",
  "cEx": "flow()\n{\n	int jpid;	// JMS Pool Id\n	int jcid;	// JMS Connection Id\n	char error_msg[1024 + 1];	// Error string. Must be 1024 size\n	int ret;	// Error code\n	int msg_len = 1024;\n	char msg[1024 + 1];\n\n	if((jpid = ns_ibmmq_init_consumer(\"127.0.0.1\", 1414, \"queue_manager\", \"channel\", \"queue\", \"user_id\", \"mWWDbw3Cjb0lke7UZuaS0A==\", 1, error_msg)) < 0)\n	{\n	  fprintf(stderr, \"Error in initializing IBMMQ consumer. Error code = %d, Error Msg = %s\", jpid, error_msg);\n	  return;\n	}\n\n	if((jcid = ns_ibmmq_get_connection(jpid, \"IBMMQConsumerConnect\", error_msg)) < 0)\n	{\n	  fprintf(stderr, \"Error in getting IBMMQ connention. Error code = %d, Error Msg = %s\", jcid, error_msg);\n	  return;\n	}\n	if((ret = ns_ibmmq_get_msg(jcid, msg, msg_len, \"IBMMQGetMsg\", error_msg)) < 0)\n	{\n	  fprintf(stderr, \"Error in gettting message using IBMMQ connention. Error code = %d, Error Msg = %s\", ret, error_msg);\n	}\n}",
  "javaEx": "int ns_ibmmq_get_msg( int jpcid, char *msg, int msg_len, char *transaction_name, char *error_msg)",
  "cEx": "flow()\n{\n	int jpid;	// JMS Pool Id\n	int jcid;	// JMS Connection Id\n	char error_msg[1024 + 1];	// Error string. Must be 1024 size\n	int ret;	// Error code\n	int msg_len = 1024;\n	char msg[1024 + 1];\n\n	if((jpid = ns_ibmmq_init_consumer(\"127.0.0.1\", 1414, \"queue_manager\", \"channel\", \"queue\", \"user_id\", \"mWWDbw3Cjb0lke7UZuaS0A==\", 1, error_msg)) < 0)\n	{\n	  fprintf(stderr, \"Error in initializing IBMMQ consumer. Error code = %d, Error Msg = %s\", jpid, error_msg);\n	  return;\n	}\n\n	if((jcid = ns_ibmmq_get_connection(jpid, \"IBMMQConsumerConnect\", error_msg)) < 0)\n	{\n	  fprintf(stderr, \"Error in getting IBMMQ connention. Error code = %d, Error Msg = %s\", jcid, error_msg);\n	  return;\n	}\n	if((ret = ns_ibmmq_get_msg(jcid, msg, msg_len, \"IBMMQGetMsg\", error_msg)) < 0)\n	{\n	  fprintf(stderr, \"Error in gettting message using IBMMQ connention. Error code = %d, Error Msg = %s\", ret, error_msg);\n	}\n}",
  "insertStrC": "ns_ibmmq_get_msg( int jpcid, char *msg, int msg_len, char *transaction_name, char *error_msg);",
  "insertStrJava": "ns_ibmmq_get_msg( int jpcid, char *msg, int msg_len, char *transaction_name, char *error_msg);",
  "description": "The ns_ibmmq_get_msg() function to get messages from a JMS queue/topic using a connection taken using the get connection API. This function returns an error code and an error message in case of any errors.",
  "component": [
    {
      "id": "$1",
      "type": "TextField",
      "label": "JMS Pool Connection id",
      "labelVarCheckbox": "",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter pool connection id",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Number",
        "required": true,
		"max": 2147483647,
		"min": 0
		}
    },
	{
      "id": "$2",
      "type": "TEXT_VAR",
      "label": "Message",
      "labelVarCheckbox": "If message is a program variable.",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter message",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Text",
        "required": true
		}
    },
	{
      "id": "$3",
      "type": "TextField",
      "label": "Message Length",
      "labelVarCheckbox": "",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter message length",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Number",
        "required": true,
		"max": 2147483647,
		"min": 0
		}
    },
	{
      "id": "$4",
      "type": "TEXT_VAR",
      "label": "Transaction Name",
      "labelVarCheckbox": "If transaction name is a program variable.",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter transaction name",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Text",
        "required": true
		}
    },
	{
      "id": "$5",
      "type": "TEXT_VAR",
      "label": "Error Message",
      "labelVarCheckbox": "If error message is a program variable.",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter error message",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Text",
        "required": true
		}
    },
    {
      "id": "$ret",
      "type": "TextField",
      "label": "Return Variable",
      "labelVarCheckbox": "",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "First character must be Alpha.\r\nOther characters are Alpha, Numeric or Underscore.",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Text",
	"pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,63}$",
        "required": false,
        "method": "isValidVar(arg)"
      }
    }
  ]
}
