xpmdispose

  • Creator
    Topic
  • #51358
    Steve Drozdowski
    Participant

      Does anyone have an example of how to use xpmdispose within a tcl fragment?  This would be used to “kill” a msg in an xlate.

      Yes, I know, it is always better to filter msgs pre-xlate…

      Thanks.

    Viewing 2 reply threads
    • Author
      Replies
      • #69871
        Jim Kosloskey
        Participant

          If you are on a Cloverleaf release that has the IF Action you can do the IF Action and then issue a SUPPRESS when true. The SUPRESS ends up not producing a message from the Xlate – pretty much the same as KILLing it.

          No Tcl required…

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

        • #69872
          Jim Kosloskey
          Participant

            I realize I did not give any input to the actual question.

            It has been a while since I have used xpmdispose (maybe as long as 12 – 13 years), however I seem to recall that is used for messages you create inside your XPM code (with an xpmencode for example) not for the message the XPM (Xlate is creating).

            The structure is xpmdispose xpmid disp msgid – where:

             xpmid is the Xlate handle provided by XPM

             disp is the disposition to be applied to the msgid list

             msgid is a list of message handles (created with the xpmencode   mentioned above as I recall)

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

          • #69873
            Robert Milfajt
            Participant

              Within an Xlate, you do not have access to the message handle of the message being created by the Xlate, probably because the Xlate is actually creating the outbound message.  Everything else Jim said is right on the money.

              You need to use SUPRESS from within the Xlate.  If you need to do work from within a TCL fragment, have that statement set a variable, e.g., @kill.  Then in a subsequent Xlate statement do an IF on the value of @kill and SUPRESS as necessary.

              Hope this helps,

              Robert Milfajt
              Northwestern Medicine
              Chicago, IL

          Viewing 2 reply threads
          • The forum ‘Cloverleaf’ is closed to new topics and replies.