What you are attempting can be a daunting task. Others have tried. https://tech.forums.softwareag.com/t/dynamic-source-code-generation-seems-impossible-with-naturalone/102727
It would help if you would list specific problems, rather than “it doesn’t work.”
Your code sample is based on Natural’s Dynamic Source Text Creation/Execution feature. Refer to the documentation on the RUN statement. I don’t think the RUN statement works properly in ONE, so you may need to test your code in your target (native Natural) environment.
If you can get the RUN statement to work, then remember that SCC Toolkit was developed for mainframe use. If the components you need happen to use READ statements to access Adabas FUSER (source code) or FDIC (Predict DDMs) files, you will need to replace them with user exits (SYSEXT), because ONE maintains source and DDMs in the file system, not Adabas.