Unfortunately, there is no way to reverse syntax back into the gui, although, as you probably know, going back to a dialog, including CTABLES, on the same dataset and in the same session does restore the previous contents.
The CTABLES gui generates syntax that is often more complicated than it needs to be, especially with the /TABLE subcommand, and it generates some unnecessary subcommands that just restate defaults, so you might be able to just write simpler syntax. E.g.,
CTABLES
/TABLE a + b by c > d.
could be sufficient as long as the variable measurement levels are set correctly.
Beyond that, the macro facility can be used to construct part or all of a block of syntax that you might want to reuse. See the DEFINE statement in the Command Syntax Reference for details. The macro facility, however, is not a model of ease of use. Python programmability can also be used to generate reusable templates.
If you want to post an example showing what you would reuse, maybe I can provide more help.
------------------------------
Jon Peck
------------------------------