Can I access DRIVERCTL in an XLATE?

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Can I access DRIVERCTL in an XLATE?

  • Creator
    Topic
  • #49205
    Vincent Tran
    Participant

      Hi, I am basically working on a proof of concept of:

      Clients <--> Cloverleaf with multi-server <--> Server

      The Client will send a message to Cloverleaf, Cloverleaf will send a message to the Server, the Server will send a response back to Cloverleaf, Cloverleaf will send the response back to the client.

      Since multi-server is turned on, I believe I need to append the CONNID to the message that is sent to the server. Is this done in an XLATE? I’m not sure how to access the DRIVERCTL data in an XLATE. Any help or suggestions would be appreciated, thanks!

      – Vincent

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

          Vincent,

          I think you can reference the metadata for a message via Tcl while inside an Xlate.

          However, in the scenario you describe, I don’t think the DRIVERCTL on the message sent by server (I am assuming a Query Reply) will have the information you need. Therefore, being able to access the metadata inside an Xlate won’t do you any good.

          You will need to devise a mechanism by which you can associate the reply with the client IP address outside of the message.

          One method I can think of is to have the IP address in the message and require the server to return that somewhere in the response. Another mechanism is to have some sort of Query identification which is returned in the response such that it can be matched against something like a file which contains the IP asociated with that Query ID.

          Or perhaps some other mechanism…

          Jim Kosloskey

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

        • #61098
          Vincent Tran
          Participant

            Thanks for your advice Jim.

            I figured it out. In my TPS Inbound Data I have a TCL script that appends DRIVERCTL to the message. Since this is just a proof of concept I just appended it at the beginning. The message is routed to the server. The messages from the server are routed back to Cloverleaf. In the TPS Outbound Data I strip off the DRIVERCTL from the message received from the Server and then set the DRIVERCTL for the message.

            I noticed it would crash sometimes, when I turned off retry for sending back to the client, it didn’t crash anymore.

            Now I just need to test it more…

          • #61099
            Russ Ross
            Participant

              Jim you are correct that metadata can be accessed in an Xlate.

              The main commands for accessing metadata in an Xlate are:

              xpmmetaget

              xpmmetaset

              In fact, you helped me with a proc called xlt_USERDATA_keylset that does just that and can be found in clovertech post

              https://usspvlclovertch2.infor.com/viewtopic.php?t=1367&highlight=xltuserdatakeylset” class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=1367&highlight=xltuserdatakeylset

              Russ Ross
              RussRoss318@gmail.com

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