Kevin McGinn · Apr 20, 2022 go to post

A more optimal processing loop:

where hdl.run_obj_method("%Next",[status]):

     <process results>

Kevin McGinn · Sep 19, 2022 go to post

That is my point of confusion. The 'IsError' method returns a value of 1 which indicates an error. But the run_class_method() is returning valid allocated and used global sizes for the specified global. I am unclear how I am getting valid results and an error. These would seem to be mutually exclusive.

Kevin McGinn · Sep 20, 2022 go to post

Ok, trying to isolate my syntax error. I have re-reviewed the class specs but I am not seeing an issue. I have this:

    allocated = 0
    used      = 0
    db          = "/data/testdb/"
    global      = "STRELPERF"
    
    # Set args to pass by reference
    list = [db,global,allocated,used]

    # exec the class method to get the global size
    res = self.db.run_class_method("%Library.GlobalEdit", "GetGlobalSize",list)

This is the call that returns the failure status of res(0,). The associated error text is :

ERROR #00: (no error description)

Since for other databases that do not contain the global I get the error:

ERROR #308: Global STRELPERF not found.

It seems that code clip is close but something that I am not seeing is missing. Any help would be appreciated.

Kevin McGinn · Dec 22, 2022 go to post

I found the best approach was with pythonbind:

import intersys.pythonbind3 as pyb

url = "localhost"
userName= "???"
password="???"
port=1972

def main():
        conn     = pyb.connection()
        version = conn.get_implementation_version()
        conn.connect_now(f'[{url}][{port}]:%SYS', userName, password,None)

        # Create objects used to access cache/iris
        db  = pyb.database(conn)
        qry    = pyb.query (db)
        obj    = pyb.object(db)

......

With the connection handle and the db, qry, obj objects you can use the methods and classes to access any database item in the cache database

Kevin McGinn · Jun 5, 2023 go to post

I resolved this issue. Permissions were incorrect on the new device. Missed this when reviewing the issue. Fixed the device permissions, shutdown the instance, updated the cache.cpf file, and re-started the instance