If you type or modify programs in the editor, you may save them to external files by typing ESC-9 (or sometimes F9) (which will bring up a mini- menu on the bottom of the screen) and choosing "Write File" by moving the cursor to the right (CTRL-F) and hitting Return when the "Write File" choice is highlighted. This will bring up a small window at the bottom where you may type the name of the file in which you wish to save your program.
In the X-windows version of SPSS, to perform these operations you click the File menu, then choose the appropriate operation from the list that appears.