Posted: Thu Aug 04, 2016 5:18 am Post subject: Timer Node Issues in IIB 10
Voyager
Joined: 04 Sep 2012 Posts: 77 Location: UK beyond the meadows of RocknRoll
Flow: TimeoutNotification(ID:StartNotif)-->ComputeNode1 where I build a timeoutcontrol request XMLNSC msg with ID:ControlNotif-->TimeoutControlNode(ID:CtrlNotif)(Req location:InputRoot.XMLNSC.TimeoutRequest)
During a long session of debugging, suddenly noticed my flow is throwing an error "Structure id mismatch at offset" at the failure terminal in TimeoutNotification node(ID:CtrlNotif). The preceding details in the same exception tree contained MQMD Null Buffer.
I have the following 2 statements in ComputeNode1 to build my tiny MQMD as TimeoutControl node requires it.
Code:
SET OutputRoot.MQMD.Version = MQMD_CURRENT_VERSION;
SET OutputRoot.MQMD.Format = MQFMT_STRING;
My TimeoutReq created in the computenode1 is given below:
Code:
SET OutputRoot.XMLNSC.TimeoutRequest.Action = 'SET';
SET OutputRoot.XMLNSC.TimeoutRequest.Identifier = 'CtrlTimer';
IF CURRENT_TIME BETWEEN '06:00:00' AND '23:00:00' THEN
SET OutputRoot.XMLNSC.TimeoutRequest.StartDate = CURRENT_DATE ;
SET OutputRoot.XMLNSC.TimeoutRequest.StartTime = CURRENT_TIME ;
ELSE
SET OutputRoot.XMLNSC.TimeoutRequest.StartDate = CURRENT_DATE + INTERVAL '1' DAY;
SET OutputRoot.XMLNSC.TimeoutRequest.StartTime = CAST('06:00:00' AS TIME FORMAT 'HH:mm:ss');
END IF;
SET OutputRoot.XMLNSC.TimeoutRequest.Interval = 3600; -- repeat every HOUR specified in seconds
SET OutputRoot.XMLNSC.TimeoutRequest.Count = -1; -- forever
SET OutputRoot.XMLNSC.TimeoutRequest.IgnoreMissed = TRUE; -- ignore timeouts missed while flow was stopped
I did read that the error code and message means one of the fields expecting INT has got a char or vice versa.. I have checked all my datatypes and they are correct.
Been scratching my head since morning and it is time to reveal this peculiar case to the wider world for guidance.
Update: Tried with 2 formats of data had string for both StartDate and StartTime and again with DATEformat for StartDate and Timeformat for StartTime. Both trials gave me the same error so am gonna conclude it is not due to those fields. _________________ A Colorblind man may appear disadvantaged but he always sees more than just colors...
IF CURRENT_TIME BETWEEN '06:00:00' AND '23:00:00' THEN
SET OutputRoot.XMLNSC.TimeoutRequest.StartDate = CURRENT_DATE ;
SET OutputRoot.XMLNSC.TimeoutRequest.StartTime = CURRENT_TIME ;
ELSE
SET OutputRoot.XMLNSC.TimeoutRequest.StartDate = CURRENT_DATE + INTERVAL '1' DAY;
SET OutputRoot.XMLNSC.TimeoutRequest.StartTime = CAST('06:00:00' AS TIME FORMAT 'HH:mm:ss');
END IF;
Are those StartDate/StartTime assignments going to work without a CAST + format string ? The infocenter specifies that the StartDate must be in "yyyy-mm-dd" format + StartTime in "hh:mm:ss" format.
Try adding a CAST with FORMAT clause to align the date/time formats. _________________ Independent Middleware Consultant
andy@knownentity.com
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
I also get the feeling that this
Code:
IF CURRENT_TIME BETWEEN '06:00:00' AND '23:00:00' THEN
SET OutputRoot.XMLNSC.TimeoutRequest.StartDate = CURRENT_DATE ;
SET OutputRoot.XMLNSC.TimeoutRequest.StartTime = CURRENT_TIME ;
ELSE
SET OutputRoot.XMLNSC.TimeoutRequest.StartDate = CURRENT_DATE + INTERVAL '1' DAY;
SET OutputRoot.XMLNSC.TimeoutRequest.StartTime = CAST('06:00:00' AS TIME FORMAT 'HH:mm:ss');
END IF;
Won't detect the time correctly.
Just to be sure I'd change the code to look like
Code:
IF CAST(CURRENT_TIME as char format 'HH:mm:ss') BETWEEN '06:00:00' AND '23:00:00' THEN
SET OutputRoot.XMLNSC.TimeoutRequest.StartDate = CURRENT_DATE ;
SET OutputRoot.XMLNSC.TimeoutRequest.StartTime = CURRENT_TIME ;
ELSE
SET OutputRoot.XMLNSC.TimeoutRequest.StartDate = CURRENT_DATE + INTERVAL '1' DAY;
SET OutputRoot.XMLNSC.TimeoutRequest.StartTime = CAST('06:00:00' AS TIME FORMAT 'HH:mm:ss');
END IF;
Not tested or verified but.... _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Joined: 04 Sep 2012 Posts: 77 Location: UK beyond the meadows of RocknRoll
Quote:
Are those StartDate/StartTime assignments going to work without a CAST + format string ? The infocenter specifies that the StartDate must be in "yyyy-mm-dd" format + StartTime in "hh:mm:ss" format.
I tried with both the cast and format and got the same error. I also tried the NOW and TODAY keywords which threw the same error.
I will try the MQMD_STRUC_ID and will let you know.
@smdavies99 : The time check part works when I tested it for both conditions. I will change according to your suggestion and will see if that makes a difference.
It will be a while before I report my results as I changed the design for delivery. _________________ A Colorblind man may appear disadvantaged but he always sees more than just colors...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum