How easily to extract an IBDIR name from netconfig ?

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf How easily to extract an IBDIR name from netconfig ?

  • Creator
    Topic
  • #49543
    Ga
    Participant

      Hi,

      In TCL, I need to extract the exactly IBDIR name in Netconfig file for a calling thread TCL proc. That is for an inbound thread, protocol = fileset-local OR fileset-ftp, PROPERTIES button of protocol : in Inbound section, I need to extract the Directory name I putted there in my setup because I want to use that path to do a copy of each reading files with ‘old’ extension. I tried before without success to do the copy without that path.

      Thanks in advance

      Ga

    Viewing 11 reply threads
    • Author
      Replies
      • #62417
        Jim Kosloskey
        Participant

          Gaeten,

          That would be nice if that information were avaiable during the Directory Parse UPoC.

          What I use is a generic, reusable proc and it requires arguments giving the directory path for the inbound and where the copy should go.

          If I could get the inbound directly, I could eliminate one argument (I would still need to know where the copy should go).

          I refuse to use the unsupported mechanisms to interrogate the NetConfig and instead, continue to push Quovadx to publish a supported API to provide access into the various configuration files.

          If you want to use them, there are some mechanisms which come with Cloverleaf(R) that allow you to navigate the NetConfig. That is all I know about them – others probably can give you more assitance there.

          Thanks,

          Jim Kosloskey

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

        • #62418
          John Hamilton
          Participant

            I agree with Jim but have found I do need to get that config data.

            If you do a search on this form for “netcfgLoad” you should be able to find all kinds of related topics to those tcl procs.

          • #62419
            Charlie Bursell
            Participant

              In the latest version, the directory and file name are provided in the DRIVERCTL metdata field.  Sorry to say that the Directory Parse UPoC still provides only the file name itself.

              I typically use a Directory Parse UPoC to check a file is stable prior to reading it and, as such, I need the full path to size it.  My Directory Parse UPoC has a subroutine which reads the NetConfig to get the directory name.

              If you just need the path in a TPS proc then get it from the metadata.  If you need it in a Directory Parse UPoC, send me an e-mail and I’ll give you an example of how I do it.  Or, better yet, attend the User’s Conference and I will provide lots of example procs.

            • #62420
              Ga
              Participant

                Hi,

                Thanks a lot for your answer and I’m agree with you and I hope as your saying Jim, in a following release, Quovadx will publish a supported API to provide access into the various configuration files.

                Jim, I’m exactly do the sameting than you with my Directory Parse UPoC for the same reasons. I like sample and functional solution.

                Have a nice day,

                Ga

              • #62421
                Simone Heckmann
                Participant

                  Hi,

                  does anyone know if the problem with the missing IB-dir information in directory parse TPS has been fixed in V5.8?

                  I’m currently thinking about writing a directory parse TPS to make Cloverleaf rename any file to .tmp before reading it to avoid concurrent access of the writing system while cloverleaf still reads.

                  However – same problem as above – I can’t rename unless I have the full path to the files.

                  I tried to sample some metadata from an directory parse message in V5.8 but I still can’t find any suitable information on the IB directory.

                  Is there still no alternative to parsing the NetConfig?

                  Thanks!

                  Simone

                • #62422
                  Charlie Bursell
                  Participant

                    Yes, full path is there now

                  • #62423
                    John Mercogliano
                    Participant

                      Although I don’t have time to test it in an dir proc I don’t see way it won’t work.  In the out bound I’ve used nfLoad to get the OBDIR value so I don’t have to hard code the directory where the file will be located.

                      Code:

                      set strNetConfig [file join $::HciSiteDir NetConfig]
                      nfLoad $strNetConfig arrProcessData arrHostData arrXlateData arrNetFilePrologue
                      set strOBDir [keylget arrHostData($::HciConnName) PROTOCOL.OBDIR]

                      Change OBDIR to IBDIR and that should get you the inbound directory name for the connection.  

                      Hope this works for you.

                      John Mercogliano
                      Sentara Healthcare
                      Hampton Roads, VA

                    • #62424
                      Simone Heckmann
                      Participant

                        Charlie Bursell wrote:

                        Yes, full path is there now

                        Hey Charlie,

                        that’s good news! Would you care to elaborate as to where I might find that piece of information?

                        Here’s a message dump of a V5.8.3 dir parse message:

                        Code:

                        msg: 0x02BBD088
                           msgType           : DATA
                           msgClass          : PROTOCOL
                           msgState          : Unknown: 0 (0)
                           msgPriority       : 5120
                           msgRecoveryDbState: Log:off (1)
                           msgFlags          : 0x2
                           msgMid            : [0.0.8]
                           msgSrcMid         : midNULL
                           msgSrcMidGroup    : midNULL
                           msgHostId         : 874907791
                           msgOrigSrcThread  :
                           msgOrigDestThread :
                           msgSrcThread      :
                           msgDestThread     :
                           msgXlateThread    :
                           msgSkipXlate      : 0
                           msgSepChars       :
                           msgNumRetries     : 0
                           msgGroupId        : 0
                           msgDriverControl  :
                           msgRecordFormat   :
                           msgRoutes         :
                           msgUserData       :
                           msgStaticIsDirty  : 0
                           msgVariableIsDirty: 0
                           msgTimeStartIb    : 1310737171,004
                           msgTimeStartOb    : 1310737171,004
                           msgTimeCurQueStart: 0,000
                           msgTimeTotalQue   : 0,000
                           msgTimeRecovery   : 1310737171,004
                           msgEoConfig       : 0x00000000
                           msgData (BO)      : 0x02BBD170
                           message           : ‘txt_anfo2.txt txt_anfo3.txt txt_anfo4.txt txt_anfo5.txt txt_anfo6.txt’

                        I still get only a space separated list of filenames with no path information in either the message itself or the metadata.

                        Am I looking in the wrong places?

                        Thanks for any advice!

                        Simone

                      • #62425
                        Simone Heckmann
                        Participant

                          John Mercogliano wrote:

                          Code:

                          set strNetConfig [file join $::HciSiteDir NetConfig]
                          nfLoad $strNetConfig arrProcessData arrHostData arrXlateData arrNetFilePrologue
                          set strOBDir [keylget arrHostData($::HciConnName) PROTOCOL.OBDIR]


                          Hope this works for you.

                          Thanks John!

                          It works like a charm! (I tested it with IBDIR instead of OBDIR)

                          …but it still kinda feels like a hack…

                          I’d prefer having the engine handing over the information voluntarily rather than having to violently extract it from cloverleaf’s intestines .

                          😀

                          Geetings

                          Simone

                        • #62426
                          Charlie Bursell
                          Participant

                            set klst [msgmetaget $mh DRIVERCTL]

                            set filename “”; keylget klst FILENAME filename

                            The above will give you the full path.  If you want just the file name do a file tail command

                          • #62427
                            Simone Heckmann
                            Participant

                              Charlie Bursell wrote:

                              set klst [msgmetaget $mh DRIVERCTL]

                              set filename “”; keylget klst FILENAME filename

                              Sorry Charlie,

                              the above code just gives me empty stings. As you can see in the message dump I posted, there’s no DRIVERCTL information in the metadata whatsoever.

                              Maybe you’re thinking about IB-TPS-messages? Those definitely have the fields you mentioned. But it seems to me, for directory parse messages the information is still missing…

                              Greetings

                              Simone

                            • #62428
                              Charlie Bursell
                              Participant

                                You are correct.  We cannot put in the DRIVERCTL until after the Directory Parse routine becuse, at that point, we don’t know which file to read.

                                Unfortunately the list provided to Directory Parse only has the names.

                                This might be a valid enhancment request to provide at least the directory name a t that point.

                                As someone else suggested, I simply read the NetConfig to get the directory

                                I don’t have my archived stuff with me right now but if you send me an e-mail I will be glad to send you a copy of the Directory Parse proc I use to verify a file is stable prior to fetching it

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