Posted: Sat Dec 04, 2004 1:24 am Post subject: Some check this code,and reply plz ???
Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
I have a BLOB domain message flow getting a XML input of
<Name>
<FirstName>ELVIS</FirstName>
<LastName>NINAN</LastName>
</Name>
I want to just get an output as: ELVISNINAN
My ESQL is like this:
CREATE COMPUTE MODULE CIO_TO_DATABASE_MSGFLOW_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
DECLARE CobolOutput BLOB;
CALL CopyMessageHeaders();
SET CobolOutput = CAST( (InputBody.VehicleInfoRequest.RegistrationNumber || InputBody.VehicleInfoRequest.RegistrationType) AS BLOB CCSID InputRoot.Properties.CodedCharSetId);
SET OutputRoot.BLOB.Vehicle = CobolOutput;
RETURN TRUE;
END;
CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;
END MODULE;
Plz help, i have been stuck with this problem for days now....thx
The only valid field under OutputRoot.BLOB is BLOB. You can't use OutputRoot.BLOB.Vehicle, and you can't use any subfields under OutputRoot.BLOB.BLOB either. _________________ I am *not* the model of the modern major general.
Have you considered using the MRM parser with a CWF message defintion for this ? Because what you appear to have on output is a very simple fixed length message. You will be able to reference individual fields on output and make your ESQL a whole lot simpler esspecially if you any more complicated COBOL structures to output.
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