ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Get & Show Hexa in DSPF

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Get & Show Hexa in DSPF

    Hello friends ,

    I used WRKDBF and see if i press F8 (show Hex/Char) it will show hexa value.

    My question is how to get hexa value in RPG and show it to DSPF ?
    Need tips & trick.

    For DSPF i'm using SFLFOLD.


    Thanks

    CosmasAay

  • #2
    Re: Get & Show Hexa in DSPF

    If you want to see the HEX-Values, the easiest way is to use the SQL Function HEX(MyField). To make it visible just move the result into a character field.

    Birgitta

    Comment


    • #3
      Re: Get & Show Hexa in DSPF

      Hello Hauser,

      Thanks for the input.

      But how to display hexa value like in WRKDBF ?


      example
      -------

      field: PCK4 ZND5 CHR2 PCK6
      char : à| 55555 22 ãã?
      hex1 : 044 FFFFF FF 0666
      hex2 : 44F 55555 22 666F


      If the value of PCK4 is 4444 (hexa = 04444F), how to display it in hex1 & hex2 without using logic (%subst) ?
      Any tip & trick ?


      Thanks

      Comment

      Working...
      X