Return multiple values to an xlate

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Return multiple values to an xlate

  • Creator
    Topic
  • #52533
    Mike Campbell
    Participant

      I’m currently writing a tclproc to query an odbc database for values.

    Viewing 7 reply threads
    • Author
      Replies
      • #74590
        Jim Kosloskey
        Participant

          Mike,

          Is this proc an xltp type proc (invoked from within the Xlate) or a Tps type proc – executed before the Xlate?

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

        • #74591
          Mike Campbell
          Participant

            It is an xltp type proc.

          • #74592
            sylaja suseela
            Participant

              Hi Mike,

              Could you please share tcl code for doing ODBC from Xlate?

              I want to query Oracle DB passing 2 arguments ( to be used in qry where clause) and return a single value  back to Xlate.

              Thanks in advance,

              Sylaja

            • #74593
              Mike Campbell
              Participant

                Sylaja,

              • #74594
                John Vano
                Participant

                  Ironically something similar to this was part of an training project I just did.  I acomplished this using a copy action with the following pre-proc:

                  set last [lindex $xlateInVals 0]

                  # iterate over PID;5 to add the OBX with

                  for {set i 0} {$i < [string length $last]} {incr i} {

                    xpmstore $xlateId 1(0).OBX($i).#1(0) c [expr $i+1]

                    xpmstore $xlateId 1(0).OBX($i).#3(0) c Space^Mountain

                    xpmstore $xlateId 1(0).OBX($i).#5(0) c [string index $last $i]

                  }

                  Hope this helps.

                • #74595
                  sylaja suseela
                  Participant

                    Thanks Mike, John.

                    I have successfully completed this ODBC call to Oracle from Xlate and put it live.

                    Mike, I am doing similar to what you did. Many thanks for the code example.

                    Regards,

                    Sylaja

                  • #74596
                    Mike Campbell
                    Participant

                      Sylaja,

                      I’m glad it worked for you.  

                       Mike C.

                    • #74597
                      sylaja suseela
                      Participant

                        Hi Mike,

                        The bit of ODBC code to query oracle DB is working fine. However I see an additional qyery being issued against the Oracle DB ‘SELECT TZ_OFFSET (DBTIMEZONE), TZ_OFFSET (SESSIONTIMEZONE) FROM DUAL’. These are adding on to the process count and causing issues in Oracle (max processes = 300).

                        Anybody seen such queries being issued behind the scenes by odbc SQLFreeHandle functions?

                        Thanks,

                        Sylaja

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