ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

edit codes for a field

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

  • edit codes for a field

    Hello,

    I have a field that is 9S 2 . I am trying to assign some edit codes to the field but keep getting this message:
    Keyword not valid with data type or keyboard shift value.

    Can't I assign EDTWRD(' . ') to a field that is defined as 9S 2? I tried using a EDTCDE(J) but that didn't work either.

  • #2
    Re: edit codes for a field

    your edit word is 11 long not nine

    yours
    Code:
    EDTWRD('123456789.01')
    mine
    Code:
    EDTWRD('1234567.01')
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: edit codes for a field

      610 A 9 12'EFFECTIVE DATE:'
      620 A PEAMT R N B 7 28REFFLD(POEVL/PEAMT CLPPOEVL)
      621 A EDTWRD(' . ')
      * CPD7554-*

      * CPD7554 20 1 Message . . . . : Keyword not valid with data type or keyboard shift value.


      Tried this and still getting the error:
      621 A EDTWRD('1234567.01')

      If the field is 9S 2, don't I put 9 spaces in the Edit word to get it to work?

      Comment


      • #4
        Re: edit codes for a field

        Leave it blank dont put the 1234567 in there its just to show you spaces...

        Jamie
        All my answers were extracted from the "Big Dummy's Guide to the As400"
        and I take no responsibility for any of them.

        www.code400.com

        Comment


        • #5
          Re: edit codes for a field

          I know this sounds weird but I had to create a new field like this and the edtwrd worked:

          0006.20 A PEAMTT 9Y 2B 7 28EDTWRD('123456789.01') 0006.21 A CHECK(RB)

          If I use the reference field description: which is PEAMT 9S 2 it errors out using the same edit word.

          Kinda confused but oh well got it to work.

          DAC

          Comment


          • #6
            Re: edit codes for a field

            It would appear the PEAMT field is not 9.2. Check the printout fom the CRTPF/CRTLF to see where it gets the REFFLD from. Perhaps its finding something in the library list thats not what is expected. The fact that a non-REF field works seems to indicate the REFFLS is other than numeric.

            Comment

            Working...
            X