Topic
  • 2 replies
  • Latest Post - ‏2013-02-06T21:16:31Z by SystemAdmin
SystemAdmin
SystemAdmin
535 Posts

Pinned topic showing hexidecimal values in debug

‏2013-02-06T20:36:28Z |
Is there a way to show the actual hexidecimal value of a variable (an API variable, specifically) while in debug?
Updated on 2013-02-06T21:16:31Z at 2013-02-06T21:16:31Z by SystemAdmin
  • barbara_morris
    barbara_morris
    385 Posts

    Re: showing hexidecimal values in debug

    ‏2013-02-06T20:55:57Z  
    You can add :X to the end of the variable.
    
    ===> eval field:x   ===> eval field:x 10
    

    You have to be a bit careful with varying length fields. Ordinary EVAL shows you the data, but EVAL with :X, it also shows you the length part.
    
    1 D varfield        s              5a   varying inz(
    'abc') 2 C                   
    
    return
    

    
    > EVAL varfield VARFIELD = 
    'abc  ' > EVAL varfield:x 00000     00038182 830000.. ........ ........   - ..abc.
    
  • SystemAdmin
    SystemAdmin
    535 Posts

    Re: showing hexidecimal values in debug

    ‏2013-02-06T21:16:31Z  
    You can add :X to the end of the variable.
    <pre class="jive-pre"> ===> eval field:x ===> eval field:x 10 </pre>
    You have to be a bit careful with varying length fields. Ordinary EVAL shows you the data, but EVAL with :X, it also shows you the length part.
    <pre class="jive-pre"> 1 D varfield s 5a varying inz( 'abc') 2 C return </pre>
    <pre class="jive-pre"> > EVAL varfield VARFIELD = 'abc ' > EVAL varfield:x 00000 00038182 830000.. ........ ........ - ..abc. </pre>
    works perfect. thanks!