{
  "synLogic": "int $ret \u003d $api($1, $2, $3);",
  "help": "This function sets the timeout duration for retrieving a message from an IBM MQ queue using the specified process ID (jpid) and returns the updated timeout value. If the retrieval operation takes longer than the specified timeout duration, an error message is returned.",
  "notes": "",
  "returns": "\n- The updated timeout value (in milliseconds) is returned upon successful execution of the function.\n- If an error occurs during execution, the function returns -1.",
  "arguments": "\u003ctable class\u003d\"newGuiTable\" style\u003d\"width:100%\" \u003e \u003ctr\u003e \u003cth\u003e Argument \u003c/th\u003e \u003cth\u003e Description \u003c/th\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e JPID \u003c/td\u003e \u003ctd\u003e A connection ID identifying the process requesting to retrieve a message from the queue. \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e Timeout \u003c/td\u003e \u003ctd\u003e An integer value representing the timeout duration in milliseconds. \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e Error Message \u003c/td\u003e \u003ctd\u003e A pointer to a character array that will store any error messages generated by the function. \u003c/td\u003e \u003c/tr\u003e \u003c/table\u003e",
  "parameterization": "",
  "name": "ns_ibmmq_set_getMsg_timeout",
  "syntax": "int ns_ibmmq_set_getMsg_timeout(int jpid, double timeout, char *error_msg)",
  "javaSyntax": "int ns_ibmmq_set_getMsg_timeout(int jpid, double timeout, char *error_msg)",
  "cEx": "flow()\n{\n  int jpid = 1234;\n  int timeout = 5000;\n  char error_msg[256];\n\n  int updated_timeout = ns_ibmmq_set_getMsg_timeout(jpid, timeout, error_msg);\n  if (updated_timeout == -1) {\n    printf(\"Error setting timeout: %s\", error_msg);\n  } else {\n    printf(\"Timeout successfully set to %d milliseconds.\", updated_timeout);\n  } \n}",
  "javaEx": "flow()\n{\n  int jpid = 1234;\n  int timeout = 5000;\n  char error_msg[256];\n\n  int updated_timeout = ns_ibmmq_set_getMsg_timeout(jpid, timeout, error_msg);\n  if (updated_timeout == -1) {\n    printf(\"Error setting timeout: %s\", error_msg);\n  } else {\n    printf(\"Timeout successfully set to %d milliseconds.\", updated_timeout);\n  } \n}",
  "insertStrC": "ns_ibmmq_set_getMsg_timeout(int jpid, double timeout, char *error_msg);",
  "insertStrJava": "ns_ibmmq_set_getMsg_timeout(int jpid, double timeout, char *error_msg)",
  "description": "This function sets the timeout duration for retrieving a message from an IBM MQ queue using the specified process ID (jpid) and returns the updated timeout value. If the retrieval operation takes longer than the specified timeout duration, an error message is returned.",
  "component": [
    {
      "id": "$1",
      "type": "TextField",
      "label": "JMS Pool id",
      "labelVarCheckbox": "",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter pool id",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Number",
        "required": true,
		"max": 2147483647,
		"min": 0
		}
    },
	{
      "id": "$2",
      "type": "TextField",
      "label": "Timeout",
      "labelVarCheckbox": "",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Timeout should be numeric",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
	  "quotes" : false,
      "validate": {
        "inputType": "Text",
        "required": true,
		"pattern": "^[0-9]+(\.[0-9]*)?$",
		"max": 0,
		"min": 0
		}
    },
	{
      "id": "$3",
      "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)"
      }
    }
  ]
}