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 » Iib9: Esql To check datatype

Post new topic  Reply to topic
 Iib9: Esql To check datatype « View previous topic :: View next topic » 
Author Message
akil
PostPosted: Wed Jun 17, 2015 6:17 pm    Post subject: Iib9: Esql To check datatype Reply with quote

Partisan

Joined: 27 May 2014
Posts: 338
Location: Mumbai

hi

The fieldtype function can tell the type of the field ( name, name value, attribute etc ) , what is the way to check the data type of a field?

We have a DFDL model, and when iterating through the element list, we want to be able to know the datatype of the element.

Regards
_________________
Regards
Back to top
View user's profile Send private message Visit poster's website
dragonMastar
PostPosted: Wed Jun 17, 2015 9:51 pm    Post subject: Reply with quote

Newbie

Joined: 27 Apr 2015
Posts: 9

Ummmm. what did you define in the messageset then?
Back to top
View user's profile Send private message
akil
PostPosted: Thu Jun 18, 2015 12:05 am    Post subject: Reply with quote

Partisan

Joined: 27 May 2014
Posts: 338
Location: Mumbai

There's just a DFDL model and some ESQL code such as the following ..

Values from the DFDL are being used to create a queryString, now when an element is a float or a decimal , I need to be able to format it in a specific way .. I can't do that without knowing the data-type of the element ...


Code:

      -- we take the element that is coming in
      DECLARE refInp REFERENCE TO InputRoot.DFDL.atom:*; 
      
      -- we get to the first child
      MOVE refInp  FIRSTCHILD;

      -- we iterate over all the children, making a query string       
      WHILE LASTMOVE(refInp) DO
         SET FieldName = FIELDNAME(refInp);
         SET FieldValue = FIELDVALUE(refInp);
         
         CREATE LASTCHILD OF OutputLocalEnvironment.Destination.HTTP.QueryString NAME FIELDNAME(refInp) VALUE FIELDVALUE(refInp);
         
         MOVE refInp NEXTSIBLING;
      END WHILE;

_________________
Regards
Back to top
View user's profile Send private message Visit poster's website
smdavies99
PostPosted: Thu Jun 18, 2015 1:46 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Perhaps some sort of naming convention for the different data types?

blXXXX boolean
chYYYY char/string
inZZZZ integer
etc
etc

I can see what you are trying to do but IMHO there will always be exceptions so trying to do this universally is (again IMHO) doomed to fail.
_________________
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.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jun 18, 2015 5:48 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Have you looked at FIELDTYPE?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Iib9: Esql To check datatype
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.