Posted: Thu Dec 04, 2003 2:10 am Post subject: Incorrect MQRFH2 position...
Centurion
Joined: 26 Feb 2003 Posts: 120 Location: Italy - Milan
I've developed the eSQL below:
DECLARE C INTEGER;
SET C = CARDINALITY(InputRoot.*[]);
DECLARE I INTEGER;
SET I = 1;
WHILE I < C DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
SET OutputRoot.Properties.MessageFormat = 'SWIFT';
SET OutputRoot.MQMD.Format = MQFMT_RF_HEADER_2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = 2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)StrucLength = MQRFH_STRUC_LENGTH_FIXED_2 + 224;
SET OutputRoot.MQRFH2.(MQRFH2.Field)CodeCharSetId = 500;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = MQFMT_STRING;
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID = 1208;
SET OutputRoot.MQRFH2.ComIbmFml.Version = '1.0';
SET OutputRoot.MQRFH2.ComIbmFml.Payment.Msg_type = 'S' || Environment.Variables.msg;
SET OutputRoot.MQRFH2.ComIbmFml.Payment.Message_format = 'SWIFT';
SET OutputRoot.MQRFH2.ComIbmFml.Payment.Schedule.Schedule_date = '2003-12-04';
SET OutputRoot.MQRFH2.ComIbmFml.User.User_ref = 'BRLI888888888888';
SET "OutputRoot"."MRM"."MessageString" = "InputBody"."MessageString";
I don't know why you are getting it in this order. Maybe you have already got it set up like this before entering this compute node? What does a trace of ${Root} before this show? Does it matter? If it does, then you could use dynamic references to move things to the right place. For example:
Code:
IF ("OutputRoot"."MQRFH2"."ComIbmFml" IS NOT NULL) THEN
-- Declare the dynamic reference
DECLARE Ref REFERENCE TO "OutputRoot"."MQRFH2"."ComIbmFml";
-- Move the dynamic reference to the next item in the array
DETACH Ref;
ATTACH Ref TO "OutputRoot"."MQRFH2"."mcd" AS NEXTSIBLING;
END IF;
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