|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Iib9: Esql To check datatype |
« View previous topic :: View next topic » |
Author |
Message
|
akil |
Posted: Wed Jun 17, 2015 6:17 pm Post subject: Iib9: Esql To check datatype |
|
|
 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 |
|
 |
dragonMastar |
Posted: Wed Jun 17, 2015 9:51 pm Post subject: |
|
|
Newbie
Joined: 27 Apr 2015 Posts: 9
|
Ummmm. what did you define in the messageset then?  |
|
Back to top |
|
 |
akil |
Posted: Thu Jun 18, 2015 12:05 am Post subject: |
|
|
 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 |
|
 |
smdavies99 |
Posted: Thu Jun 18, 2015 1:46 am Post subject: |
|
|
 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 |
|
 |
fjb_saper |
Posted: Thu Jun 18, 2015 5:48 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you looked at FIELDTYPE?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|