ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Negative Value in Display File

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

  • Negative Value in Display File

    Dear Expert

    I am having trouble to put -837292873.45 in the display file
    Because i need to handle amount.

    Any idea what can i do ?

    thanks

  • #2
    Re: Negative Value in Display File

    What does your code look like?

    Comment


    • #3
      Re: Negative Value in Display File

      Hi Peacealida,

      step1:For this problem you have to take * in front of the display file variable..
      Ex *666666)--Like something variable in display file

      step2:It invokes select field keywords screen in that you have to select editing keywords Y

      step3:set the EDTCDE as Q then remove the EDTWRD some thing like ' , '

      It will assign the negative sign left of the variable..If it is negative value it will display the negative or if it is positive it wont display the negative at left side of the variable..

      Comment


      • #4
        Re: Negative Value in Display File

        Try this what i posted above, but i don't know its the right solution for what your achieving exactly.


        Thanks

        Comment


        • #5
          Re: Negative Value in Display File

          use editcode "N"

          Click image for larger version

Name:	Noname.gif
Views:	1
Size:	3.3 KB
ID:	126457


          Code:
                A            MYDECIMAL     11Y 2O  3  5EDTCDE(N)             
                A                                  2  6'Decimal'             
                A                                      DSPATR(HI)            
                A                                      DSPATR(UL)

          Code:
          f@AE       cf   e             workstn                                                
                                                                                               
          d MyNumber        s             11  2 inz(-837292873.45)                             
                                                                                               
                                                                                               
           /Free                                                                               
                mydecimal = mynumber;                                                          
                exfmt window1;                                                                 
                *inlr = *on;                                                                   
           /End-Free
          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

          Working...
          X