ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Edit codes with %editc

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

  • Edit codes with %editc


    We have some items in our parts number file that are length 7 with 4 decimal positions. For some part#'s, all 4 decimal positions are zero, for some, the last 3 are all 0's, the last 2 are 0's, the last one only is 0. I want to display them as follows
    Click image for larger version

Name:	image.png
Views:	206
Size:	3.4 KB
ID:	158696

    will %EDITC handle this or do I need to manipulate each string using %check, %subst, etc.

  • #2
    I realize I will have to move the 4 fields above to alpha fields

    Comment


    • #3
      I would do it, as you have found out, with a alpha field in a statement like this:


      evalr displayAs = %trimr( %char(actual) : '0.')

      Comment

      Working...
      X