PROTOCOL:upoc

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf PROTOCOL:upoc

  • Creator
    Topic
  • #52452
    Jerry Tilsley
    Participant

      Does anyone have any examples on how they have used this?  I’m looking at implementing something here to read data from a database and am curious to how others have taken advantage of this feature.

      Thanks,

      Jerry

    Viewing 7 reply threads
    • Author
      Replies
      • #74249
        Jeff Dinsmore
        Participant

          I use this to do a daily import of an external charge master table into a local SQLite database.

          Jeff Dinsmore
          Chesapeake Regional Healthcare

        • #74250
          Jerry Tilsley
          Participant

            Can you share some code/setup of the connection that you have?

          • #74251
            Russ Ross
            Participant

              I posted an example of how I use the UPOC protocol to communicate with our IBM mainframe via TCP/IP by having the UPOC invoke the appropriate application (TRHB) on the mainframe and then send it the FRL containing the textual transcription document.

              Not what you are trying to do exatcly but shows a working example of how to do a UPOC protocol.

              Also search for UPOC will likely give many hits and other examples on clovertech.

              Here is the URL of my post that includes most of the details you are looking for, including a copy of the code for my upoc_tran_client.tcl and NetConfig screen shots:

              https://usspvlclovertch2.infor.com/viewtopic.php?t=2409&

              It even has logic in it that reads from the USERDATA metadata that gets set in another cloverleaf process during xlate to communcate to the outbound UPOC thread if the document was too large and has been truncated.

              One thing to remember when doing UPOC that is significant, you assume the responsiblilities that the cloverleaf engine typically handles for you and have to code for those responsibilities.

              Also remember if your UPOC has a sleep in it that it will sleep the entire process and any threads in that process.

              Russ Ross
              RussRoss318@gmail.com

            • #74252
              Jerry Tilsley
              Participant

                Ross,

                Thank you for the example, unfortunately your example is a write TPS upoc, but I would like to do a Read on the protocal:UPOC and am having trouble figuring out how to get it to fetch the messages from a sqlite database (no Data Integrator license).

                Thanks,

                Jerry

              • #74253
                Russ Ross
                Participant

                  Prior to the time we had a Cloverleaf data Integrator license and could do an ODBC connection protocol,  we used a niche product called Iguana.

                  Russ Ross
                  RussRoss318@gmail.com

                • #74254
                  Jeff Dinsmore
                  Participant

                    I have a read TPS that runs every hour.

                    It calls a Tcl script that reads a CSV file and builds a SQLite database for use instead of a lookup table in Cloverleaf.

                    The Tcl proc is below. The call to crmcCdmDb::update does the CSV read and writes to the SQLite DB.

                    The proc doesn’t generate any outbound messages, but I expect that would be as simple as creating a new message handle, populating it and “CONTINUE $mh”.

                    proc importSiemensChargeMaster { args } {

                    keylget args MODE mode                      ;# Fetch mode

                    set dispList {}                             ;# Nothing to return

                    switch -exact — $mode {

                      start {

                         # Perform special init functions

                         # N.B.: there may or may not be a MSGID key in args

                    }

                    run {

                    # ‘run’ mode always has a MSGID; fetch and process it

                    }

                    time {

                    # Timer-based processing

                    # N.B.: there may or may not be a MSGID key in args

                    crmcCdmDb::update

                    return $dispList

                    }

                           

                       shutdown {

                    #nothing to do

                       }

                           

                       default {

                         error “Unknown mode ‘$mode’ in importSiemensChargeMaster”

                       }

                           

                     }

                     return $dispList

                    }

                    Jeff Dinsmore
                    Chesapeake Regional Healthcare

                  • #74255
                    Bob Richardson
                    Participant

                      Greetings,

                      We use UPOC protocol for some custom FTP operations in our shop.

                      However, if you look at the online documentation for creating messages from a UPOC protocol, the CONTINUE dispostion will destroy the message.

                      You need to consider using either PROTO or SEND here.

                      See the online documentation (from the IDE) and search on UPOC.

                      Hope this helps.

                      Good luck in your project!

                    • #74256
                      Jerry Tilsley
                      Participant

                        Thanks all!  I did get this working using the TIMER portion of the TPS script.  Is the READ portion ever used?  Do you have any examples of using the READ portion of the TPS script in a protocol:upoc?

                        Thank again!

                        Jerry

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