ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Can you give me WATCH Syntax in Debugging....!

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

  • Can you give me WATCH Syntax in Debugging....!

    Hi All,

    While debugging how to use WATCH.

    Can you any one give me example with syntax ?

    I need practicle example ? I am suffering a lot from this ?

  • #2
    Re: Can you give me WATCH Syntax in Debugging....!

    Regards

    Kit
    http://www.ecofitonline.com
    DeskfIT - ChangefIT - XrefIT
    ___________________________________
    There are only 3 kinds of people -
    Those that can count and those that can't.

    Comment


    • #3
      Re: Can you give me WATCH Syntax in Debugging....!

      Hi b.reddikumar:

      Within debug key f1 (help)......
      Goto the bottom place your cursor on rpg language examples and press enter.
      Scroll to watch a variable press enter.

      Watch a variable

      RPG declaration: D FLD S 3A INZ('abc')

      Debug command: WATCH FLD

      Result: The program stops if the storage where the
      variable FLD is located is changed to a new
      value. The length watched is the size of
      variable FLD, three bytes.


      Debug command: WATCH FLD : 8

      Result: The program stops if the storage starting
      at where variable FLD is located is changed
      to a new value. The length watched is the
      size specified, eight bytes.


      Comment: A maximum of 128 bytes may be watched with
      one watch.

      The storage location and not the variable is
      watched. If the variable is in temporary
      storage and the storage is used again, a
      watch breakpoint may occur that is unrelated
      to the original variable changing.
      instead of keying "watch fld"
      you can key "w fld"
      or you can place your cursor on the field you want to watch and press f17

      Best of Luck
      GLS
      The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

      Comment


      • #4
        Re: Can you give me WATCH Syntax in Debugging....!

        Thank you Abraham ,

        But i tried with following method it showing warning message

        watch fld : from this i am getting " Call stack entry does not exist" and

        and for F17 on field also same warning.

        Comment


        • #5
          Re: Can you give me WATCH Syntax in Debugging....!

          Hi Again,

          I tried already what you said but it is not working.......!

          I don't know why.....?

          Comment


          • #6
            Re: Can you give me WATCH Syntax in Debugging....!

            Hi b.reddikumar:

            1. Set a breakpoint in your program
            2. Execute your program ......

            When it stops at your breakpoint you should be able to watch/F17
            on any field that is used within your program.

            < e d i t >(if the field you are trying to watch is in a sub-procedure try setting the breakpoint within that sub-procedure before watch/F17)< / e d i t >

            Best of Luck
            GLS
            Last edited by GLS400; August 22, 2012, 07:59 AM.
            The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

            Comment

            Working...
            X