Hi Dojo community,
As the question states I am trying to store permanent values in memory files using persistent type. the issue is you have to select which file to link it to, so my question is there any way to automate this ?
Thanks in advance
As this question has now been inactive for a very long time, I will close it. If you still want more information about this, could you post a new question?
Hi Amer,
If I understood correctly, you would like to select programmatically the memory file that will be used in your script. A possible option is to create a new script that can run a your script as subscript.
For example, below a small example of a script with the memory file 'memory 1' as input:
This small test script generate an information event displaying the value stored in the position 1 of the memory file.
Below an example of the new (main) script that will run the previous script as subscript:
In this main script you can set programmatically which memory file will be used by the script TEST_MEMORY_SCRIPT.
More information about these methods can be found in DataMiner Docs (PrepareSubscript).
Hope it helps.
Hi Miguel,
I understand sending a memory file to a sub script from a parent but the scripts I am talking about would be from two mainscripts ran at different times( a day later).
The issue for me stems that when you execute the main script you have to link a memory file to memory1 which I was wondering if that can be automated
check the edit for the screenshot
Hi,
Apart from using a script that will call the subscript with the memory variable, other options are using scheduled task or correlation rule. Another option implies calling the script from a connector (driver).
Please if you could elaborate the use case, we could check other alternatives. For example, does the use case requires memory files?
Hi Miguel yes and no. so there is a script that must be manually launched to configure the memory files and schedule the sub scripts. the issue is when you launch the config script you must manual select the memory file and I was wondering if there is a way to make that selection fixed to one selection. Atm I have a function to make sure that the correct memory file is selected if not it throws an error.
Hi Amer,
Please could you let me know if you were able to cover your use case?
With your last comment ‘Atm I have a function to make sure that the correct memory file is selected if not it throws an error’ it seems that you found a workaround. Is this correct?
I see that this question has been inactive for some time. Have you found a solution for this yet? If so, could you select the answer (using the ✓ icon)? If not, could you provide some more information as requested in Miguel’s comment?