Author |
Message
|
hotdarshan |
Posted: Mon Mar 17, 2008 8:45 pm Post subject: Set to High Values |
|
|
Novice
Joined: 17 Mar 2008 Posts: 16
|
Hi All,
Currently i am working in transformation from xml to cobol in which i have encountered a problem.
I want to set a field by High Values(xml to cobol). I dont know how to set a field to high values that is it says set to hex FF.  |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 18, 2008 1:45 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Using what? WMB? Which version? What platform? Mapping, XSLT, ESQL, what? What have you tried? What happened?
Isn't high-values just x'FF'? (My COBOL was a few years ago). What's wrong with setting it to that?
Help us to help you.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
hotdarshan |
Posted: Tue Mar 18, 2008 4:07 am Post subject: Set to High Values |
|
|
Novice
Joined: 17 Mar 2008 Posts: 16
|
I am using Message Broker ToolKit 6.1, in windows platform and using ESQL to map. ya i want to map a field with hex FF so what coul be done |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 18, 2008 4:09 am Post subject: Re: Set to High Values |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
hotdarshan wrote: |
I am using Message Broker ToolKit 6.1, in windows platform and using ESQL to map. ya i want to map a field with hex FF so what coul be done |
Use ESQL to fill the target field with hex FF?
I think I'm missing the point of your question here, because on the face of it this is a straightforward operation... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fschofer |
Posted: Tue Mar 18, 2008 4:41 am Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
Hi,
do you have a sample how the input looks like and what the output should be ?
Grüsse
Frank Schofer |
|
Back to top |
|
 |
hotdarshan |
Posted: Tue Mar 18, 2008 4:44 am Post subject: Set to HighValues |
|
|
Novice
Joined: 17 Mar 2008 Posts: 16
|
If i Use ESQL to fill the target field with x'FF' it will take it as string and x'ff' will be taken i dnt think it is the correct one hope u understood my problem |
|
Back to top |
|
 |
hotdarshan |
Posted: Tue Mar 18, 2008 4:53 am Post subject: |
|
|
Novice
Joined: 17 Mar 2008 Posts: 16
|
data type of this field in cobol copy book is String of length 1, i want to set the value as hex FF
SET temp = x'FF';
SET temp1 =cast(cast(temp as BLOB ) as char ccsid InputProperties.CodedCharSetId);
SET OutputRoot.MRM.msg_TDRIV5DATAAREA.TDRIV5_CODE=temp1 |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 18, 2008 5:37 am Post subject: Re: Set to HighValues |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
hotdarshan wrote: |
hope u understood my problem |
Nope.
You have a field. You want each byte of that field set to x'FF'. Why not set each byte to x'FF' and walk away?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Mar 18, 2008 5:38 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
There's a COBOL reserved word HIGH-VALUES that correponds to hex 'FF'.
So, MOVE HIGH-VALUES TO field-name. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
hotdarshan |
Posted: Tue Mar 18, 2008 5:55 am Post subject: |
|
|
Novice
Joined: 17 Mar 2008 Posts: 16
|
Thanks for the response. But i am still not clear.
Could you please eloborate on how can we set each byte to hex'FF' in ESQL code. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 18, 2008 6:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
hotdarshan wrote: |
Could you please eloborate on how can we set each byte to hex'FF' in ESQL code. |
I've not tried it, nor have any means at hand to try it, but something like
Code: |
SET OutputRoot.MRM.msg_TDRIV5DATAAREA.TDRIV5_CODE=X'FF'; |
would seem to be a starting point for a length 1 field. Presumably this doesn't work for you for some reason I've failed to grasp? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
hotdarshan |
Posted: Tue Mar 18, 2008 8:09 pm Post subject: |
|
|
Novice
Joined: 17 Mar 2008 Posts: 16
|
But i have tried this i dont think this is the right way.....it directly x'ff' as a srting..  |
|
Back to top |
|
 |
Vitor |
Posted: Wed Mar 19, 2008 1:26 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
hotdarshan wrote: |
i dont think this is the right way |
Then I'm sure someone will post a better suggestion shortly.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Mar 19, 2008 12:06 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
|
Back to top |
|
 |
wbi_telecom |
Posted: Mon Nov 23, 2009 6:48 am Post subject: |
|
|
 Disciple
Joined: 15 Feb 2006 Posts: 188 Location: Harrisburg, PA
|
I am working on XML to COBOL copybook conversion and have a similar requirement as of this post to move X'FF into a PIC X(01) field. The Link that Kimbert has given is no longer valid. Can anyone please give me an updated link or point me to the right direction?
I have already searched the inforcenter for "X'FF" and "High values" but nothing came up as to how to set them using ESQL.
Cheers, |
|
Back to top |
|
 |
|