Checklist to Run Basic Scripts in Modern SPSS Versions
Most scripts from Sax (WinWrap) Basic Scripts Library were developed in SPSS versions prior to 16. In SPSS 16.0 major changes to SPSS object model used for scripting were introduced. As a result, some of the scripts might not work in later IBM SPSS Statistics versions (say, 16.0, 19.0 or 23.0) as expected.
The official help summarizes key differences between scripting in pre-16 and 16+ versions of SPSS, with examples. You'll find it under Help > Core System > Scripting Facility > Scripting in Basic > Compatibility with Versions Prior to 16.0. I recommend to read it if you are going to apply scripts from this collection or develop your own scripts based on examples prepared earlier.
Here are main points to consider if a script does not run as intended:
- Some objects in SPSS became obsolete in SPSS 16. You may have problems with scripts related to objects like Interactive graphs, Draft Ouput Window or Maps.
- Global procedures file is not required anymore. But older scripts assume that Global script exists (by using functions defined in Globals). As Global script file is still exists physically, but not registered in system, you may modify scripts so that they reference to that global script. This could be done with special comment line, see Help.
- You'll probably have to modify any autoscript from the collection. Now autoscript has to be look as regular script, with Main procedure in it. The only difference from a regular script is that autoscript will have a special scriptContext object filled in, which makes the reference to the output invoked the autoscript.
- If you are making connection with Basic script from external application to SPSS (as COM client), you have to reference SPSS instance as SPSS.Application16 (even for post-16 versions).
- Default Basic script file type is changed to .wwd (note, BTW, that global script is now Global.wwd). But this is not a big issue, as the .sbs extension is still respected for compatibility.
I am going to publish soon several examples of modifying older scripts to make them work in newer SPSS versions, as I getting such questions from web site visitors from time to time.
...