Author |
Message
|
vickas |
Posted: Tue Oct 22, 2013 4:21 am Post subject: Mapping character type to unsignedshort type in compute node |
|
|
Centurion
Joined: 18 Aug 2013 Posts: 126
|
Hie,
I need to map a CHARACTER datatype to a field , but in the messagedefinition, that field is of UNSIGNEDSHORT type...
I have no option to change the message definition.
I read that character belongs to the integer family,so is there anyway
to map it ? (am using compute node,esql) |
|
Back to top |
|
 |
Simbu |
Posted: Tue Oct 22, 2013 4:39 am Post subject: |
|
|
 Master
Joined: 17 Jun 2011 Posts: 289 Location: Tamil Nadu, India
|
plz check for ESQL to xml schema mapping in infocenter and use appropriate data type. |
|
Back to top |
|
 |
vickas |
Posted: Tue Oct 22, 2013 5:27 am Post subject: |
|
|
Centurion
Joined: 18 Aug 2013 Posts: 126
|
I have gone through it, but that couldnt help me ! |
|
Back to top |
|
 |
dogorsy |
Posted: Tue Oct 22, 2013 7:29 am Post subject: |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
vickas wrote: |
I have gone through it, but that couldnt help me ! |
I have suggested a couple of times before that you need to learn about ESQL datatypes. That will save you time and having to post here basic problems that you should know how to solve. |
|
Back to top |
|
 |
dogorsy |
Posted: Tue Oct 22, 2013 7:46 am Post subject: Re: Mapping character type to unsignedshort type in compute |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
vickas wrote: |
I read that character belongs to the integer family |
where have you read that ?!
please refer to http://www.ogf.org/documents/GFD.174.pdf
and read the "DFDL built-in types"
Last edited by dogorsy on Tue Oct 22, 2013 7:48 am; edited 1 time in total |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Oct 22, 2013 7:46 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
In adittion to what my colleague has suggested, it is very easy to try a few things out for yourself. Good old Trial and Error.
Then you can come back and say, I did this, this and this and got these errors. _________________ 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 |
|
 |
kimbert |
Posted: Tue Oct 22, 2013 7:46 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Use the CAST function. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
dogorsy |
Posted: Tue Oct 22, 2013 7:54 am Post subject: |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
kimbert wrote: |
Use the CAST function. |
yes, can use CAST, but CHAR to INT can result in an exception, unless he uses the DEFAULT clause which I don't think it is what the OP wants, if the input field is a true CHAR (A-Z,a-z,0-9, etc) |
|
Back to top |
|
 |
|