Forum Replies Created
-
AuthorReplies
-
Peter,
I am curious if you tried this select outside of Cloverleaf (with something like DB Analyzer)?
If so, did that return multiple elements in the result set? Are you configured to handle multiple elements in the result set?
If you are configured for multiple elements in the result set, how is that configuration defined?
Jim
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.
Also understand the & has special meaning as an HL/7 separator so the receiving system (depending on how it parses the message) may treat that as a separator rather than data.
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.
You do not indicate what release of Cloverleaf but if 6.0 or later, check out the Xlate STRING Action Map command I think that should do it without using Tcl. If you are not familiar with the STRING Action, email me and I will send you a packet with a presentation that explains all of the STRING Action Functions; some additional STRING Actions I created; an exercise Xlate for all of the STRING Actions (including the ones I have written/modified); and a test file to use with the Xlate in the Testing tool.
If you decide to explore the STRING Action Map Function, realize the backslashes (\) are Tcl escape characters and you will need to escape them something like this \\T\\ in your map.
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.
July 14, 2025 at 2:19 pm in reply to: SFTP Server File Backup to Subfolder After Deletion by Cloverleaf Interface #122104One way I can think of is to route the messages to the OB side of the thread (or another sftp thread) pointing the OB side to the directory where you want the archive/backup to exist. I think the metadata will contain the file name but you may need to provide the directory path.
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.
John,
Upon investigation and in keeping with your observation, it appears like the Stage DB Tcl API (stageinit and stagegetkeys for example) is not provided even though it is documented.
In reality the protocol fairly cries for a Gui tool to browse the Stage DB (like for SMAT DB or the DB Admin). I was hoping to use the documented Stage DB Tcl API commands to provide a command line utility or set of utilities to expose the Stage DB for analysis and debugging.
Apparently, that is not possible in a release as late as 2209. Maybe 2205 has provided the API that is documented.
I too like the DTC protocol and have used it once. I feel it needs to be polished however and have made suggestions. Time will tell if it gets more polished.
In my opinion, it has some real limitations for usability for message enrichment in all potential scenarios. But to truly make orchestration and enrichment fully functional I think the Xlate will need to be modified as well to allow the definition of multiple IB messages to accomplish a merge function.
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.
John,
Thanks for the info. I will investigate. If I have any additional questions, would you be willing to commiserate off-line? If so, just send me an email.
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.
I am just musing out loud here, but I wonder if that is not a copy of the elog with a person’s initials (-wal). Is that possible?
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.
If this is for an Xlate, I have a reusable proc intended for this purpose. Arguments provide the offset desired among other things (like resultant format). If you would like a copy of that proc, email me.
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.
Hopefully, the sending system can provide a valid XML Schema. With that, you can compile the XML message and use that structure in an Xlate (along with the HL/7 needed).
Cloverleaf can reference the file via the Fileset/FTP protocol if needed (that would have a port involved). The exchange is not ‘real time’ however, it is still file-based and will involve reads.
If there is no schema, you could use 3rd party tools to create a schema from the XML but that is not very reliable. You could also use Tcl to parse the XML yourself – not something I have done.
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.
You will need to use Tcl. In your Tcl code issue the gvsetvar command (search for gvsetvar in the User Doc). As I understand it the variable can be in-memory or be stored in a .ini file. Using gvsetvar only sets the in-memory value. If you would like the value to be more permanent, then I think you also need to do a gvsave (but be aware that saves ALL in-memory Global Variables to the .ini file).
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.
Sorry, I mis-read the message. It is PID-3.5 but if you want the subcomponents the method remains the same.
I see in the first message there are repeating fields (missed that – eyes getting old). Is that what you want to know how to get to?
If so, I see 2 choices:
- use the field repetition position in the address Path like this: …PID#3.(0) and PID#3.(1).
- Use the ITERATE Action to work through the repetitions.
I do not think there is a need for Tcl here.
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.
For the PID-3 issue, there is a subcomponent expressed (the & is the standard HL/7 subcomponent separator). Assuming those are there because there really are subcomponents and not erroneously placed text, one would use subcomponent notation to get at those items. It appears the subcomponents are to the 4th component so your copy would look something like this: …PID#3.(0).[5][0] and PID#3.(0).[5].[1].
However, PID-3.6 is usually Mother’s Maiden Name and so I am not sure those are not ampersands erroneously entered into the text rather than subcomponents. If that is the case, the source system should have escaped them like this: \T\ (assuming \ is what is specified in MSH-2 escape character – \ is the standard).
As for the message structure, I am not sure I fully understand your question but if you want the standard structure for a ive HL/7 2 version Message/Event Type, use the HL/7 Configurator. That defaults to the standard message structure.
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.
March 28, 2025 at 11:12 am in reply to: Persistent Database Connection for Performance Optimizat / #121949You may be correct, I have not tried that. Can you cite the authority for the global variables not being used for DB Handles?
The User Doc I see with 2209 indicates string content and does not specifically preclude object handles (but that does not mean they are not precluded). Have you tried using the global variables for the handle associated with the DB connection?
I guess as an alternative, and depending on the detail of your architecture, you could limit the connects somewhat by using the Tcl global variables at thread start. So, for those threads there would only be one open at start (more if there is an intervening drop of connection). This assumes each thread has a finite Table set it addresses, and a single connection can be effective.
Assume messages get directed in a site to multiple destinations and each destination addresses the management of a given DB Table within the thread. A single connect at the Start Context would be made and then used for as many messages traverse that destination thread. If there then 5 destinations, there would be 5 Connections for however many messages traverse instead of a connection for each message. Not what you expressed you wanted, but I think has the potential to reduce significantly the number of connections to the DB.
The above is purely speculation on my part not intimately knowing your architecture and not being familiar with the odbc package you are using. But, based on my experience with the Data Direct and assuming a like architecture the above should work.
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.
March 26, 2025 at 10:16 am in reply to: Persistent Database Connection for Performance Optimizat / #121933The one I am referring to is the Cloverleaf Global Variables with the Tcl commands that begin with gv(damn I wish we could paste screen shots here) such as gvgetvar and gvsetvar with variable names beginning with $$. The Cloverleaf help has a lot of documentation on this feature – are you referring to that?
What release of Cloverleaf are you using? I am not sure what release CGV feature was introduced.
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.
March 25, 2025 at 3:13 pm in reply to: Persistent Database Connection for Performance Optimizat / #121926I think what Rob was referring to is the Cloverleaf Global Variables not a Tcl Global Variable.
Look up ‘global variables’ in the Cloverleaf doc. Just read it carefully as there are ‘Virtual’ or temporary Cloverleaf Variables and ‘fixed’ Global Variables (my terms) and you need to make sure you get the variable set the correct way. I scratched my head over the use of these variables for a while before I figured that out. I think I posted somewhere on this forum I think there is a bug in the way the variables can be handled. I do not think that should impact you if you study the doc well.
What I see you using is the Tcl global which I don’t think is persistent enough for what you need.
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.
-
AuthorReplies