ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Right justification of signed value in DSPF36 display file

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

  • Right justification of signed value in DSPF36 display file

    In a display file(DSPF36), one field is defined as signed numeric given below:

    DRM 81113Y YS B Y

    sign will come at the last column
    Now when the user enters the value, for example 125 and hits enter its displaying as 1250000.

    But when the user enters 125 and field exit key, it’s working perfectly.

    If i enter 125 value in that field. I need to populate 125 value and right justified instead of 1250000 with out pressing field exit key and pressing ENTER key only.



    Is there way to do that?
    Last edited by vinod2k6; November 12, 2008, 12:03 AM.

  • #2
    Re: Right justification of signed value in DSPF36 display file

    Hi All,
    its an urgent one for me please help me

    Comment


    • #3
      Re: Right justification of signed value in DSPF36 display file

      Hello

      If you put a combination of CHECK(RZ) (Right Justify, fill with zeroes) and CHECK(FE) (Field Exit Required) on the field in the DDS, it should sort your problem out pretty easily.

      Comment


      • #4
        Re: Right justification of signed value in DSPF36 display file

        That will require a Field Exit, which is what he's "not allowed" to do.

        I think what needs to happen is to have the display field defined as char, then have the RPG pgm parse and change to numeric.

        Comment


        • #5
          Re: Right justification of signed value in DSPF36 display file

          Thanks to flodge and arrow483.

          DRM 81113Y YS B Y

          If i use character in display file it will not allow negative values so, my initial conditions are i should have signed field (S data type) and if i enter 125 value it should rightjustify and give 125only not 1250000. Please note display file is in DSPF36 . and program is in RPG36. please help me
          Last edited by vinod2k6; November 12, 2008, 02:54 AM.

          Comment


          • #6
            Re: Right justification of signed value in DSPF36 display file

            Hi

            I Think in DSPF, try with the Edit Codes M hope this will remove the zeros

            if u want the sign 125- or try Q if u want sign -125

            thanks
            hsp
            'Coding = Experience'
            hsp

            Comment

            Working...
            X