Before you can execute a script, you must compile it.
To compile a script:
Click the Compile button, or select Edit>Compile from the menu bar.
PowerBuilder compiles the script and reports any problems it finds, as described in “Handling problems”.
PowerBuilder compiles automatically When you attempt to open a different script in a Script view, PowerBuilder compiles the current script. When you save the object, such as the window containing a control you wrote a script for, PowerBuilder recompiles all scripts in the object to make sure they are still valid. For example, PowerBuilder checks that all objects that were referenced when you wrote the script still exist.