Article Hiroshi Sato · Jul 6, 2023 1m read How to overload methods in ObjectScript InterSystems FAQ rubric The InterSystems ObjectScript language does not allow you to define methods of the same name with different arguments. It is generally classified as a programming language called a dynamic language. In ObjectScript, you can freely control which arguments are used when executing a method, so unlike languages such as Java, which are not dynamic programming languages, there is no need to strictly distinguish methods by the number of arguments at the compilation stage. #ObjectScript #Tips & Tricks #Caché #Ensemble #InterSystems IRIS #InterSystems IRIS for Health 5 0 1 274
Article Hiroshi Sato · Jun 22, 2023 1m read Countermeasures against SQL injection InterSystems FAQ rubric Countermeasures against SQL injection have been published on various websites, but we believe that it is possible to prevent SQL injection in applications using InterSystems SQL as well as other RDBMS by implementing these countermeasures appropriately. In addition, InterSystems Data Platform (hereinafter referred to as IRIS) incorporates several measures that make SQL injection more difficult than general RDBMS. #SQL #Tips & Tricks #Caché #Ensemble #InterSystems IRIS #InterSystems IRIS for Health 4 0 0 523
Article Hiroshi Sato · May 25, 2023 2m read API to import/export routines This is an article on the InterSystems FAQ site. 1. Export API a. Use $system.OBJ.Export() to specify individual routines to export. For example: do $system.OBJ.Export("TEST1.mac,TEST2.mac","c:\temp\routines.xml",,.errors) The format to specify is routine name.extension, and the extension is mac, bas, int, inc, obj. Errors during export are stored in errors. #Tips & Tricks #Caché #Ensemble #InterSystems IRIS #InterSystems IRIS for Health 7 2 2 594
Article Hiroshi Sato · May 18, 2023 2m read Command line interface and API to create namespaces and databases InterSystems FAQ rubric Using the Config.Configuration class and SYS.Database class methods, you can create and register a namespace database from the terminal. Below is a series of execution examples that create database file /CacheDB/AAA/cache.dat and register database AAA and namespace AAA in the configuration file (cache.cpf).* Execute in the %SYS namespace. * * Make sure that this script runs as the user that is used for all IRIS processes to ensure that the directory has appropriate ownership and permissions * #API #ObjectScript #Tips & Tricks #Caché #Ensemble #InterSystems IRIS #InterSystems IRIS for Health 4 3 0 373
Article Hiroshi Sato · Apr 27, 2023 2m read How to migrate data created based on class definition to another system InterSystems FAQ rubric Migrating data to another system takes two steps. 1. Migrating class definitions To migrate the class definition to another system, export it to a file in XML format or UDL format (extension .cls). The export procedure in Studio is as follows. Tools > Export > Select multiple classes you want to migrate with the [Add] button > Check [Export to local file] #System Administration #Tips & Tricks #Caché #Ensemble #InterSystems IRIS 2 4 0 311
Article Hiroshi Sato · Mar 23, 2023 1m read Getting the list of routines programmatically InterSystems FAQ rubric You can programmatically retrieve routine dates and sizes using the RoutineList query of the %Library.Routine (or just %Routine) class. The RoutineList query has an argument, and the routine name to be searched can be specified by prefix match or middle match. (For wildcards, specify * or ?) In the example below, *.MAC is specified as an argument. #Tips & Tricks #Caché #Ensemble #InterSystems IRIS #InterSystems IRIS for Health 5 2 0 538
Article Hiroshi Sato · Mar 15, 2023 1m read How to get client IP or machine name InterSystems FAQ rubric When connecting to the database using a client-server architecture, for example using language binding, the machine name of the client can be obtained using the following code: set client=##CLASS(%SYS.ProcessQuery).Open("P"_$j).ClientNodeName #Tips & Tricks #Caché #Ensemble #InterSystems IRIS #InterSystems IRIS for Health 3 6 0 888