ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Data Manipulation in ESQL

Post new topic  Reply to topic
 Data Manipulation in ESQL « View previous topic :: View next topic » 
Author Message
vemulareddy
PostPosted: Mon Mar 01, 2004 10:28 pm    Post subject: Data Manipulation in ESQL Reply with quote

Novice

Joined: 31 Dec 2002
Posts: 12
Location: Albury,AUS

Dear All,

I have a problemn regarding date manipulation using ESQL. This requirement is to add a particular database value to a date value received from an IDOC. ( For ex. if the date returned by IDOC is 20040212, & the database value is 12, the output should be generated as 20040224.)

When i try to use the code shown below, i'm getting an error like this:

BIP2402E: (184, 56) : Syntax error : 'integer TRIM'.

The token caused a syntax error.

Correct the syntax of your expression and redeploy the message flow.

=======================================================================================================
The Code I tried is

"IF KEY_VAL IS NOT NULL THEN

SET DT_LOOKUP_VAL =
THE (
SELECT ITEM LK.VALUE
FROM Database.LOOKUP AS LK
WHERE LK.TABLE_NAME = 'ATLAS_TO_DW_ARRIVAL_LEAD_MFANZ'
AND LK.KEY = KEY_VAL
);

END IF;

SET EINDT__HDR_WH_ARV_DATE = TRIM(InputRoot.XML.ZHUEXT01.IDOC.Z1HUEXH.EINDT);

SET SLFDT__HDR_WH_ARV_DATE = InputRoot.XML.ZHUEXT01.IDOC.Z1HUEXH.SLFDT;

SET ZHUSTAT__COMPARE = InputRoot.XML.ZHUEXT01.IDOC.Z1HUEXH.ZHUSTAT;

IF ZHUSTAT__COMPARE IN ('1','2') THEN

SET EINDT__HDR_WH_ARV_DATE = DATE EINDT__HDR_WH_ARV_DATE INTERVAL DT_LOOKUP_VAL DAY;

SET OutputRoot.XML.recordset.HDR_RECORD.HDR_WH_ARV_DATE
= EINDT__HDR_WH_ARV_DATE;

END IF;"
=========================================================================================================


I am using MQSI2.02. I did't understand why the above code syntax is not working....but If I do the following code it is working for me fine..

SET EINDT__HDR_WH_ARV_DATE = DATE EINDT__HDR_WH_ARV_DATE INTERVAL '12' DAY;


Did anybody experienced this kind of problems..Any input on this will he highly appreciated..

Thanks..

Regards,
VNR
Back to top
View user's profile Send private message Send e-mail
Eyal_Pu
PostPosted: Tue Mar 02, 2004 1:43 am    Post subject: Reply with quote

Newbie

Joined: 05 Nov 2003
Posts: 4

could it be that the variable InputRoot.XML.ZHUEXT01.IDOC.Z1HUEXH.EINDT is regared as integer, and TRIM gets a char, so then you will have the syntax error.
Try to cast InputRoot.XML.ZHUEXT01.IDOC.Z1HUEXH.EINDT into a char.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Data Manipulation in ESQL
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.