Send to Error DB from xlate

Clovertech Forums Cloverleaf Send to Error DB from xlate

Tagged: ,

  • Creator
    Topic
  • #118968
    Paul Stein
    Participant

      Is there a way to send a message to the error database within an xlate?

      If a certain condition isn’t met, I would like it to error out.

      From reading the documentation and this forum, I believe I may need to use the call action and then set the disposition to ERROR.

      I have tried calling a tps proc from within the ‘tcl’ section but I cannot get that to work.

      Any advice or help on proper syntax appreciated.

    Viewing 3 reply threads
    • Author
      Replies
      • #118969
        Jim Kosloskey
        Participant

          You can use the xmperror Tcl extension. Look up the syntax and options in the User Doc.

          I like to have the option set to let the Xlate Action determine what happens to the message that way the same code can be used anywhere in any Xlate.

          If you have more detailed questions let me know.

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

        • #118970
          Paul Stein
          Participant

            Jim – I see the xpmerror now in User Doc and was able to get a message to the errorDB by using the ‘CALL’ Action, and then selecting ‘Error’ in the Error drop down.

            That works, but is that what you meant by letting the Xlate Action determine what happens?

            Also – not sure if i should use this in a pre-proc or jus the ‘PROC’ section, as if this condition occurs, i don’t want it to go downstream at all or through the rest of the xlate

            See attached.

            Attachments:
            You must be logged in to view attached files.
          • #118972
            Jim Kosloskey
            Participant

              The syntax of xpmerror is:

              xpmerror xpmid severity message

              Where severity can be:

              action

              currdetail

              alldetail

              Action means use the Error Option in the Xlate Action which invoked the Tcl code with the xpmerror invocation. I do not recall what those options are on the Xlate Action Error pull-down but Error (which you have is one).

              You have action which is what I prefer.

              I rarely use embedded Tcl code in an Xlate but rather refer to a named procedure. I have a number of reasons why I prefer that but you need to do what works best in your environment.

               

              Be aware this did not work is some releases of Cloverleaf. You could specify everything but the message did not go to the Error DB if I recall. I think all is well on 19.x and later.

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

            • #118973
              Paul Stein
              Participant

                I understand now and agree, I have changed this to a named procedure rather than embedded now that i have this working.

                Thanks Jim.

            Viewing 3 reply threads
            • You must be logged in to reply to this topic.