inbound fileset and ACk

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf inbound fileset and ACk

  • Creator
    Topic
  • #51944
    Anonymous

      Hi,

      I ‘m reading files using local fileset protocol from local folder IN and have to write ACK files (same file name as read message file, but different file name extension) to local folder OUT. Is there already a tcl proc available for that?

      if not, how do I get the file name, if I read the file in the protocol (using CL 5.3)?

      Any help appriciated.

    Viewing 4 reply threads
    • Author
      Replies
      • #72436
        Jim Kosloskey
        Participant

          In the File Delete Tps you will get the name of the file just processed before Cloverleaf will delete it – at this point you can build your ack file.

          email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 61 years IT – old fart.

        • #72437
          Anonymous

            Many thanks Jim,

            Is there another way then passing the name in a global variable to a Inbound Data, TPS Inbound Data? (there a perform an over and change the file name of the ACK file.  

            In difference to TCP/IP protocol in the protocol thread (when using UPOCs Parse Directory and Deletion in the local file set protocol properties) the message contains the file name, but not the content of the file read.

            Using global variables is dangerous if the engine goes down.

            BTW

            An issue I noticed (CL 5.3):

            If the file name contains spaces, the read of the file errors although the file names was correctly recognized. Please see the log:

            [tps :tps :INFO/1:      file_in] tds.string = directoryParse {MSGID message0} {CONTEXT fileset_ibdirparse} {ARGS {}} {MODE run} {VERSION 3.0}

            msg: 0x003EB188

               msgType           : DATA

               msgClass          : PROTOCOL

               msgState          : Unknown: 0 (0)

               msgPriority       : 5120

               msgRecoveryDbState: 1

               msgFlags          : 0x2

               msgMid            : [0.0.194]

               msgSrcMid         : midNULL

               msgSrcMidGroup    : midNULL

               msgOrigSrcThread  :

               msgOrigDestThread :

               msgSrcThread      :

               msgDestThread     :

               msgXlateThread    :

               msgSkipXlate      : 0

               msgSepChars       :

               msgNumRetries     : 0

               msgGroupId        : 0

               msgDriverControl  :

               msgRecordFormat   :

               msgRoutes         :

               msgUserData       :

               msgStaticIsDirty  : 0

               msgVariableIsDirty: 0

               msgTimeStartIb    : 1282571752.602

               msgTimeStartOb    : 1282571752.602

               msgTimeCurQueStart: 0.000

               msgTimeTotalQue   : 0.000

               msgTimeRecovery   : 1282571752.602

               msgEoConfig       : 0x00000000

               msgData (BO)      : 0x003EB234

               message           : ‘Copy (2) of 09-a08-1.hl7’

            [diag:leak:DBUG/0:      file_in] diag md alloc 0x009FF668

            [msg :Mid :DBUG/0:      file_in] mid free [0.0.194] 0x009FF5B0

            [msg :Msg :DBUG/0:      file_in] [0.0.194] msgFree 0x003EB188

            [fset:read:DBUG/1:      file_in] Scheduling IB for 10 second interval

            [diag:leak:DBUG/0:      file_in] diag ev alloc 0x009FF6C0

            [diag:leak:DBUG/0:      file_in] diag dqe alloc 0x009FA9D8

            [pti :even:DBUG/0:      file_in] Registering TIMER (FileSet/FTP IB Timer) event 0x009FF6C0 for tid 3

            [pti :even:DBUG/0:      file_in] Registering TIMER event for tid 3

            [fset:read:INFO/0:      file_in] Opening c:AGSIN/Copy for IB

            08/23/2010 15:55:52

            [fset:read:ERR /0:      file_in] Cannot open c:AGSIN/Copy for reading: No such file or directory

            [pd  :pdtd:INFO/1:      file_in] Set driver status to PD_STATUS_ERROR

          • #72438
            Jim Kosloskey
            Participant

              I am not sure why you want to use a global variable.

              If I understand the situation, you want to write a file to acknowledge a file received AFTER the inbound file has been processed.

              In the delete UPoC you have the name of the file, the file has been processed and at this point you can write out a file which is your ack file. Now if you are saying you need the actual data content of one of the messages in the inbound file to use as a template for the acknowledgment file content that is a different issue.

              As far as the file name with imbedded spaces, have you tried adding single quotes (‘) around the file name in the dirparse routine before returning it to Cloverleaf(R)?

              email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 61 years IT – old fart.

            • #72439
              Anonymous

                Hi Jim,

                My idea for a ACK reply was to create a message in the inbound thread and using an over disposition. With that the file is writen out using CL protocol thread doing all the work. This works fine, as it is omitted writting a file by using puts commands. (In my opinion that is better to maintain.) But doing so I have to pass the file name to the UPOC in Inbound Data.

                Hard to describe, so I append my tcl procs

                I do nothing, when parsing the directory. (Only a tps, that shows the message content).

              • #72440
                Jim Kosloskey
                Participant

                  I am not sure what you want to do will work.

                  Here is my reasoning:

                  The file is read (a message comes in) and the Inbound Tps UPoC

                  email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 61 years IT – old fart.

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