infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
PROTOCOL:upoc
Jerry Tilsley
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
Find more posts tagged with
Clovertech
Comments
Jeff Dinsmore
I use this to do a daily import of an external charge master table into a local SQLite database.
Jerry Tilsley
Can you share some code/setup of the connection that you have?
Russ Ross
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.
Jerry Tilsley
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
Russ Ross
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.
Jeff Dinsmore
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
}
System
Originally posted by Bob Richardson
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!
Jerry Tilsley
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