ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Define Two Non Display Fields in the same positions

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

  • Define Two Non Display Fields in the same positions

    Hi

    Is it possible to define two non display fields(or text) in the same position in the display file?

    Eg:
    12 2 'Field A...............'
    N70 Dspatr(ND)


    12 2 'Field B...............'
    N60 Dspatr(ND)


    This is what I am trying to accomplish.
    1) I want to display Field A on the screen when the Indicator 70 is *On( *In60 will be off when *In70 is *ON)
    2) I want to display Field B on the screen when the Indicator 60 is *On( *In70 will be off when *In60 is *ON)

    Is this possbile?

    I am able to define the above texts in the display file but I am not able to display them

    Thank You
    Nanda

  • #2
    Re: Define Two Non Display Fields in the same positions

    yes...
    you will need to say 60N70 and 70N60
    I'm here to chew bubble gum and kick @#%@#%@#%.....and I'm all outta bubble gum !
    Yes I'm talking to you squirrel nuts.

    Comment


    • #3
      Re: Define Two Non Display Fields in the same positions

      I tired and it does not work. Only Field A displays.(The field that is defined first in DDs is displayed)





      Originally posted by as400Pro View Post
      yes...
      you will need to say 60N70 and 70N60

      Comment


      • #4
        Re: Define Two Non Display Fields in the same positions

        I don't believe you...

        show me a striped down version of the DDS and RPG.

        'Tis a hard winter when one wolf eats another.
        I'm here to chew bubble gum and kick @#%@#%@#%.....and I'm all outta bubble gum !
        Yes I'm talking to you squirrel nuts.

        Comment


        • #5
          Re: Define Two Non Display Fields in the same positions

          Originally posted by nandas400 View Post
          I tired and it does not work. Only Field A displays.(The field that is defined first in DDs is displayed)
          Oh it works! This Rusky Hat Trick has been around at least since 1981.

          Comment


          • #6
            Re: Define Two Non Display Fields in the same positions

            Hi AS400PRO

            This is my DDS
            PHP Code:
            A          R SCRN1                                                  
            A                                      WINDOW
            (MSGCTL)               
            A                                      CHANGE(35)                   
            A                                      RTNCSRLOC(&#RCD &#FLD &#POS) 
            A  86                                 CSRLOC(#ROW       #COL)      
            A                                      OVERLAY                      
            A                                 10  2
            'FIELD A . . . . . . . .'  
            A  70N60                               DSPATR(ND)                 
            A            #FIELDA       10A    10 27                           
            A  70N60                               DSPATR(ND)                 
            A                                 10  2'FIELD B......... . . . .' 
            A  60N70                               DSPATR(ND
            RPG: (Working)
            PHP Code:
            Eval *In60 = *On;    
            Eval *
            In70 = *Off;   
            #Pgmq = 'TSTNONDSPR';
            Write Msgctl;        
            Exfmt Scrn1;         
            *
            Inlr = *On
            Output :

            FIELD A . . . . . . . .
            PHP Code:

            Rpg Code
            (Not Working)
            Eval *
            In70 = *On;    
            Eval *
            In60 = *Off;   
            #Pgmq = 'TSTNONDSPR';
            Write Msgctl;        
            Exfmt Scrn1;         
            *
            Inlr = *On
            Output:

            Blank Screen


            Please advise

            Nanda





            Originally posted by as400Pro View Post
            I don't believe you...

            show me a striped down version of the DDS and RPG.

            'Tis a hard winter when one wolf eats another.

            Comment


            • #7
              Re: Define Two Non Display Fields in the same positions

              Set the indicators at the Field Conditioning level not the field attribute level.

              Comment


              • #8
                Re: Define Two Non Display Fields in the same positions

                Sorry. What you mean by setting at the field conditioning level?

                Thank you

                Originally posted by DAG0000 View Post
                Set the indicators at the Field Conditioning level not the field attribute level.

                Comment


                • #9
                  Re: Define Two Non Display Fields in the same positions

                  try this
                  PHP Code:
                  A          R SCREEN01                                                          
                  -------- 1 data records excluded ----------------------------------------------
                  A  70                             10  2'FIELD A . . . . . . . .'               
                  A  70        #FIELDA       10   O 10 27                                        
                  A  60                             10  2'FIELD B......... . . . .'              
                  A  60        #FIELDB       10   O 10 27 
                  I'm here to chew bubble gum and kick @#%@#%@#%.....and I'm all outta bubble gum !
                  Yes I'm talking to you squirrel nuts.

                  Comment


                  • #10
                    Re: Define Two Non Display Fields in the same positions

                    You set the indicator on the same line as the field (see the example AS400 Pro posted). In SDA prompt the field and you will see it. It doesn't work via setting the DSPATR for the field because the fields are still active in the record format and the first one specified in the code takes precedence. Setting it at the the field level your you basically turn it on or off for the record format. This is kind of similar to how you would not display things in internal output specs.

                    Comment


                    • #11
                      Re: Define Two Non Display Fields in the same positions

                      Так як Даг риби, сказав
                      I'm here to chew bubble gum and kick @#%@#%@#%.....and I'm all outta bubble gum !
                      Yes I'm talking to you squirrel nuts.

                      Comment


                      • #12
                        Re: Define Two Non Display Fields in the same positions

                        Thank You DAG0000 and AS400PRO. It worked.

                        Nanda

                        Comment

                        Working...
                        X