native-api-global-view-and-copy

Downloads5
Subscribe
3
Bookmark
0
This application is not supported by InterSystems Corporation. Please be notified that you use it at your own responsibility.
Details
Releases
Reviews
Screenshots
Issues
Articles

What's new in this version

Initial Release

A utility using IRIS NativeAPI to View, Copy, and Merge Globals
This code runs rather slowly and creates a lot of network traffic.
!! There is no need for any additional code on the source server !!

Background:
As $QUERY is not supported by Native API it is a rather long and
boring workaround with the functions IsDefined (aka $DATA) and
GetNext (aka $ORDER) to examine all Global nodes with value
and passing the structural nodes.

You have to provide
- your credentials for server access
- your level of error handling

First, you make a connection to the target SuperServer Port

do ##class(nacl.Client).Connect("192.168.0.99",41773)
- VIEW and COPY are the same code
- VIEW is simply a COPY to NUL device
- The target in COPY can have a different name
- Using a local variable as target mimics the MERGE command
- Start and Stop Subscript allow partial operation
- Stop Subscript is the first to be excluded.

 
Do ##class(nacl.GVC).Connect(serverIP,serverPORT,namespace,username,password)    
Do ##class(nacl.GVC).View(globalname,startsubscript,stopstcsript)    
Do ##class(nacl.GVC).Copy(globalname,startsubscript,stopstcsript,targetname)    

Copy writes a View of the created output.

Prerequisites

Make sure you have git and Docker desktop installed.

On your target server, you need to install
https://github.com/rcemper/native-api-command-line-extension

Installation

Clone/git pull the repo into any local directory

git https://github.com/rcemper/native-api-command-line-client

Run the IRIS container with your project:

docker-compose up -d --build

How to Test it

docker-compose exec iris iris session iris

Copy writes a View of the created output.

Article in DC

IPM installation
zpm "install nacl-gvc"
Rating
5 (1)
Category
Technology Example
Works with
InterSystems IRISInterSystems IRIS for Health
Tags
Info
Version
0.0.1
Last updated
2023-08-13
Repository
Open
Documentation
Open
License
Link