12.07.2015 Views

SPSS Programming and Data Management, 4th Edition: A Guide for ...

SPSS Programming and Data Management, 4th Edition: A Guide for ...

SPSS Programming and Data Management, 4th Edition: A Guide for ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

19Best Practices <strong>and</strong> Efficiency TipsUsing INSERT with a Master Comm<strong>and</strong> Syntax FileThe INSERT comm<strong>and</strong> provides a method <strong>for</strong> linking multiple syntax files together,making it possible to reuse blocks of comm<strong>and</strong> syntax in different projects by using a“master” comm<strong>and</strong> syntax file that consists primarily of INSERT comm<strong>and</strong>s that referto other comm<strong>and</strong> syntax files.ExampleINSERT FILE = "c:\examples\data\prepare data.sps" CD=YES.INSERT FILE = "combine data.sps".INSERT FILE = "do tests.sps".INSERT FILE = "report groups.sps".• Each INSERT comm<strong>and</strong> specifies a file that contains <strong>SPSS</strong> comm<strong>and</strong> syntax.• By default, inserted files are read using interactive syntax rules, <strong>and</strong> eachcomm<strong>and</strong> should end with a period.• The first INSERT comm<strong>and</strong> includes the additional specification CD=YES. Thischanges the working directory to the directory included in the file specification,making it possible to use relative (or no) paths on the subsequent INSERTcomm<strong>and</strong>s.INSERT versus INCLUDEINSERT is a newer, more powerful <strong>and</strong> flexible alternative to INCLUDE. Files includedwith INCLUDE must always adhere to batch syntax rules, <strong>and</strong> comm<strong>and</strong> processingstops when the first error in an included file is encountered. You can effectivelyduplicate the INCLUDE behavior with SYNTAX=BATCH <strong>and</strong> ERROR=STOP on theINSERT comm<strong>and</strong>.Defining Global SettingsInadditiontousingINSERT to create modular master comm<strong>and</strong> syntax files, youcan define global settings that will enable you to use those same comm<strong>and</strong> files <strong>for</strong>different reports <strong>and</strong> analyses.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!