Commenting Actions in Xlate

Homepage Clovertech Forums Read Only Archives Cloverleaf Product Enhancements Commenting Actions in Xlate

  • Creator
    Topic
  • #48428
    Rentian Huang
    Participant

    Greetings Cloverleafers!!!

    Has anyone had an error in your Xlate and was trying to remove all Actions (COPY, COPY, CONCAT, CALL…) one by one to figure out which Action was the causing the problem, and you HAVE to DELETE them one by one

    Would it be GREAT to have a comment function to temporary shade (NOT delete) an Action? Just like the “#” or “;#” in Tcl.

    I would be in great joy to see this feature in any future QDX upgrade.

    Sam  8)

Viewing 1 reply thread
  • Author
    Replies
    • #58616
      Mike Grieger
      Participant

      How about just using a different method to figure out which statment is causing the problem?  I would say it is simpler then removing (or deactivating, as you suggest) actions.

      simply add a new Copy action w/ @null input and @null output, with a tcl call to just echo out something… like:  puts “MADE IT HERE”.

      put this statement somewhere in the Xlate… like halfway down, and run through the testing tool.  If the echo displays before the error, the problem is farther down, otherwise it is higher up.  Just move the echo statement accordingly to narrow down to exactly where.

    • #58617
      Jim Kosloskey
      Participant

      Rentian,

      I think the Comment capability is in Cloverleaf(R) 5.6.

      In the meantime, something I do at times is to use an IF and place the suspect actions inside. The IF is something like IF =true eq =true.

      I can then place as many actions inside the IF as I need. I move the ones I think are a problem inside.

      If the Xlate is large and the potential problem area is large, I sometimes do a ‘binary search’ equivalent. Splitting the Xlate in two, testing one half at a time. If the issue happens in that half, I halve it again and test  and so on until I narrow down the area. If in the first half test the error does not appear, I then test the other half and start splitting that up, etc.

      Once I have it down to a manageable size, I might then use the IF technique above.

      I also have a proc I can invoke anywhere which echos out whatever is specified in the Source side of the CALL Action where the proc is referenced. The proc has a debug switch so it only ecxhos out if the debug switch is set.

      Sometimes I use that inside very complex ITERATEs, or IFs and then leave it in place with the debug switch set off so that in testing it does not echo out but I do not have to figure out where to place these traps later when doing redevelopment or maintenance, etc.

      Jim Kosloskey

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

Viewing 1 reply thread
  • The forum ‘Product Enhancements’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10