When working at the Caché command prompt I sometimes want to run an operating system command on the server host. By prefixing my command line with ! or $ I can do this with ease. The following examples are from 2017.1 on Windows, but the feature is available on all versions and platforms:
I need to perform additional checks before Cache user logins (let's say in a terminal for simplicity) and allow access only to those, who passed them. How do I do it?
When is a Developer Community post not a Developer Community post? When it's just a few sentences wrapped around a link to InterSystems documentation! And what better way to finish up 2021 than by telling you about something cool that's been available since v2020.3? As the ball drops in Times Square, curl up with this:
Are you all ready for something you wish you knew ages ago (or, in my case, a DECADE ago)? Open up a portal in your favorite instance and go to:
System Administration->Configuration->Additional Settings->Startup
Scroll down to "Terminal Prompt" and click 'Edit'. This allows you to edit what you see on your terminal prompt. You can change that to my current setting: 8,3,2
What does this do? It adds your instance name for your prompt. So now your prompt can look like:
I was searching for the most simple way to connect from visual studio code to my local instance via terminal without having to change any window.
I know this can also be achieved via telnet but seems a bit overhead if you're in your local machine.
For me the simplest sollution is to open a terminal window in VS Code, navigate to the /bin folder of your instance installation and run .\csession.exe INSTANCENAME
For simplicity you can just include your /bin folder in your path so you don't even need to navigate there
How can I connect using the Terminal to a remote server?
I changed the server indication on the Healthshare icon on the Windows toolbar.
The management portal works but not the Terminal. When I open the terminal it displays only some information about the server ("SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2"), but it doesn't give the possibility to log in.
I am hoping some of you network guys have ideas. InterSystems seems to be at a standstill. When I startup Studio and try to start Terminal I get License Limit Exceeded. Starting with Terminal and going to Studio, same thing. It started when I put down a 2016 version of Cache on top of a 2015. InterSystems told me to uninstall everything and start fresh. I did that but have the same problems. What can I look at? How do I start to debug this? Although I am the only one on my PC it is really impacting my performance.
I was able to run the Cache terminal from the command prompt with the following command, in the namespace that I provided in the brackets:
cterm /console=cn_ap:ENSEMBLE[TEST_1]
But the command suddenly stopped opening the terminal in the correct namespace. It just opens it in the default namespace. I tried it with different namespaces or invalid namespaces, it always opens the terminal in the default namespace now.
I cannot figure out what is causing this behaviour.
If you do not have direct access to the server that runs your IRIS Docker container you still may require access to the container outside "iris session" or "WebTerminal". With an SSH terminal (PuTTY, KiTTY,.. ) you get access inside Docker, and then, depending on your needs you run "iris session iris" or display/manipulate files directly.
Note:
This is not meant to be the default access for the average application user but the emergency backdoor for System Management, Support, and Development.
When testing a new routing rule, one frequently encountered problem is that messages that seem like they should be getting routed to a target component are not getting routed. This article aims to describe how to determine why the message didn't get routed.
1. Check the Event Log for the router to make sure there wasn't an error evaluating the rule or running any transformations referenced by the rule. If there was, debug that error first.
When my COS code is executing in a Caché process it might want to interact with the host operating system. For the purpose of this post I'm focusing on a Windows host, but much of it applies to other host OS platforms as well.
A common example of host OS interaction is when my process wants to read from or write to a file. What credentials will apply when Windows is checking whether or not to allow me access to the file?
To answer that we need to consider another question. How did our process start?
Twilio is a great tool for programmatically initiating and managing phone calls. In this example we'll go over basic account setup, create a Cache Class to manage our interaction with the Twilio API, and initiate a phone call from the Cache Terminal.
The full Class used in this example is available on GitHub as well.
CLM is a tool for localization/internationalization/adding multi-language support to a project based on InterSystems Caché.
Imagine that you have a ready project where all the content is in Russian, and you need to add an English localization to it. You wrap all your strings into resources, translate them into English and call the necessary resource for Russian or English when necessary. Nothing tricky, if you think about it. But what if there are lots of strings and there are mistakes in Russian (or English)? What if you need to localize in more than one language – say, ten? This is exactly the kind of project where you should use CLM. It will help you localize the entire content of your project into the necessary language and retain the possibility to correct entries.
For a small automation feature I would like to login to the IRIS shell non-interactively, skipping the whole username and password prompts, providing the credentials through other means. Something in the fashion of "iris session <instance-name> --user myuser --pass mypass" would be great, but the session tool itself doesn't seem to be capable of doing this.