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 456
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 316
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 263
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 446
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 723