pcm_set_context() - cassiobj/PCM-Python_lib GitHub Wiki
The pcm_set_context function is part of a Python extension for Oracle BRM. It allows changing the index of the connection array to the Oracle BRM Context Manager (CM), enabling up to 16 simultaneous connections with the CM by changing only the connection key.
The pcm_set_context function changes the index of the connection array to the Oracle BRM Context Manager (CM), allowing up to 16 simultaneous connections with the CM by changing only the connection key.
- key: The index value to be set. It must be an integer value between 0 and 15, inclusive.
The function returns an integer value representing the index value that was set.
In case of an error, the `error` exception is raised.
You can use the pcm_set_context function in your Python scripts to change the index of the connection array to the Oracle BRM Context Manager (CM). Here is an example code:
import PCMPy
# Change the index to 3
index = 3
try:
result = PCMPy.pcm_set_context(index)
if result is not None:
print("Index changed to:", result)
else:
print("Failed to change index.")
except PCMPy.error as e:
print("An error occurred:", str(e))