For BBj-specific information, see EXECUTE Verb - BBj.
The EXECUTE verb executes a string expression as if it were entered at the console.
Note: It is intended for utilities only and should not be used in normal applications.
String expression to be executed. The expression can include variables, so different commands can be executed depending on run-time conditions.
If the string expression begins with a line number, the statement is added to the program text in memory. EXECUTE may be used to modify the current program, but it is not recommended. The EXECUTE verb can be used in a public program, but only to modify the workspace program; it cannot modify a public program.
Using EXECUTE in a public program without a line number in the string expression will generate an !ERROR=38.
Using EXECUTE in console mode will generate an !ERROR=45
1000 EXECUTE "1010 PRINT X"
1000 EXECUTE "1010 PRINT ""HELLO THERE"""