TrxId Upoc to determine File Name

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf TrxId Upoc to determine File Name

  • Creator
    Topic
  • #53384
    Raj
    Participant

      Can some one tell me what am I missing here i want to find file name from a directory and set the Trxid to route message.I am missing something which i am unable to know in the code i built here is error i get when run route test

      Please Wait ……

      Command Issued: hciroutetest -x ASCII -d -f eof -e hciroutetestshowbydest Test_In /hci/cis5.8/integrator/fm_finance/Data/WESTR_PARK_NIC_2K12_410834920_NOPAY20121109130507.835

      Command output:

      Output going to stdout

      UNKNOWN_FILE_NAME

      [xlt :rout:ERR /0:  UNNAMED_TID:11/27/2012 12:10:33] No routes defined for TrxId ‘UNKNOWN_FILE_NAME’

      Below is TCL Upoc code i sm trying to wor on please some one can tell what i am missing or what should i be doing to get this file name Trxid working .

      ######################################################################

      # Name: trxid_Filename

      # Purpose:

      # UPoC type: trxid

      # Args: msgId = message handle

      # args  = (optional) user arguments

      # Returns: The message’s transaction ID

      #

      # Notes:

      # The message is both modify- and destroy-locked — attempts to modify

      # or destroy it will error out.

      #

      proc trxid_Filename { mh {args {}} } {

         global HciConnName                          ;# Name of thread

         

         keylget args MODE mode                         ;# Fetch mode

         set ctx “”   ; keylget args CONTEXT ctx        ;# Fetch tps caller context

         set uargs {} ; keylget args ARGS uargs         ;# Fetch user-supplied args

       

         set debug 0  ;                                 ;# Fetch user argument DEBUG and

         catch {keylget uargs DEBUG debug}              ;# assume uargs is a keyed list

       

         set module “trxid_Filename/$HciConnName”   ;# Use this before every echo/puts

       

         set msgSrcThd [msgmetaget $mh SOURCECONN]   ;# Name of source thread where message came from

                                                     ;# Use this before necessary echo/puts

                                                      ;# args is keyed list when available

         

         set msg [msgget $mh]

           

               # Get the IB message handle

                 keylget args MSGID mh

         # Original filename should be in the meta data

         # if not, default to UNKNOWN

         # Default name

         set OBFN UNKNOWN_FILE_NAME

         # Get driver control metadata

         set klst [msgmetaget $mh DRIVERCTL]

         # Get file name and remove from path

         keylget klst FILENAME OBFN

         set OBFN [file tail $OBFN]

                   echo $OBFN

                   return $OBFN

                             

                   if{[lcontain

    • $OBFN]}{

             set trxId “TRICARE”    ;# determine the trxid

                      }else{

             set trxId “UNKNOWN”

                      }

            echo $trxId

                      return $trxId           ;# return it

               

                 }

      Thanks

      Raj 🙂

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