Checkin of new directory structure.
[pspp-builds.git] / doc / invoking.texi
1 @node Invocation, Language, License, Top
2 @chapter Invoking PSPP
3 @cindex invocation
4 @cindex PSPP, invoking
5
6 @cindex command line, options
7 @cindex options, command-line
8 @example
9 pspp [ -B @var{dir} | --config-dir=@var{dir} ] [ -o @var{device} | --device=@var{device} ]
10        [ -d @var{var}[=@var{value}] | --define=@var{var}[=@var{value}] ] [-u @var{var} | --undef=@var{var} ]
11        [ -f @var{file} | --out-file=@var{file} ] [ -p | --pipe ] [ -I- | --no-include ]
12        [ -I @var{dir} | --include=@var{dir} ] [ -i | --interactive ] 
13        [ -n | --edit | --dry-run | --just-print | --recon ] 
14        [ -r | --no-statrc ] [ -h | --help ] [ -l | --list ] 
15        [ -c @var{command} | --command @var{command} ] [ -s | --safer ]
16        [ --testing-mode ] [ -V | --version ] [ -v | --verbose ] 
17        [ @var{key}=@var{value} ] @var{file}@enddots{}
18 @end example
19
20 @menu
21 * Non-option Arguments::        Specifying syntax files and output devices.
22 * Configuration Options::       Change the configuration for the current run.
23 * Input and output options::    Controlling input and output files.
24 * Language control options::    Language variants.
25 * Informational options::       Helpful information about PSPP.
26 @end menu
27
28 @node Non-option Arguments, Configuration Options, Invocation, Invocation
29 @section Non-option Arguments
30
31 Syntax files and output device substitutions can be specified on
32 PSPP's command line:
33
34 @table @code
35 @item @var{file}
36
37 A file by itself on the command line will be executed as a syntax file.
38 If multiple files may be specified, they are executed in order, as if
39 their contents had been given in a single file.
40 PSPP terminates after the syntax files run, unless the @code{-i} or
41 @code{--interactive} option is given (@pxref{Language control options}).
42
43 @item @var{key}=@var{value}
44
45 Defines an output device macro @var{key} to expand to @var{value},
46 overriding any macro having the same @var{key} defined in the device
47 configuration file.  @xref{Macro definitions}.
48
49 @end table
50
51 There is one other way to specify a syntax file, if your operating
52 system supports it.  If you have a syntax file @file{foobar.stat}, put
53 the notation
54
55 @example
56 #! /usr/local/bin/pspp
57 @end example
58
59 at the top, and mark the file as executable with @code{chmod +x
60 foobar.stat}.  (If PSPP is not installed in @file{/usr/local/bin},
61 then insert its actual installation directory into the syntax file
62 instead.)  Now you should be able to invoke the syntax file just by
63 typing its name.  You can include any options on the command line as
64 usual.  PSPP entirely ignores any lines beginning with @samp{#!}.
65
66 @node Configuration Options, Input and output options, Non-option Arguments, Invocation
67 @section Configuration Options
68
69 Configuration options are used to change PSPP's configuration for the
70 current run.  The configuration options are:
71
72 @table @code
73 @item -a @{compatible|enhanced@}
74 @itemx --algorithm=@{compatible|enhanced@}
75
76 If you chose @code{compatible}, then PSPP will use the same  algorithms 
77 as used by some proprietary statistical analysis packages.
78 This is not recommended, as  these algorithms are inferior and in some cases 
79 compeletely broken.
80 The default setting is @code{enhanced}.
81 Certain commands have subcommands which allow you to override this setting on 
82 a per command basis.
83
84 @item -B @var{dir}
85 @itemx --config-dir=@var{dir}
86
87 Sets the configuration directory to @var{dir}.  @xref{File locations}.
88
89 @item -o @var{device}
90 @itemx --device=@var{device}
91
92 Selects the output device with name @var{device}.  If this option is
93 given more than once, then all devices mentioned are selected.  This
94 option disables all devices besides those mentioned on the command line.
95
96 @item -d @var{var}[=@var{value}]
97 @itemx --define=@var{var}[=@var{value}]
98
99 Defines an `environment variable' named @var{var} having the optional
100 value @var{value} specified.  @xref{Variable values}.
101
102 @item -u @var{var}
103 @itemx --undef=@var{var}
104
105 Undefines the `environment variable' named @var{var}.  @xref{Variable
106 values}.
107 @end table
108
109 @node Input and output options, Language control options, Configuration Options, Invocation
110 @section Input and output options
111
112 Input and output options affect how PSPP reads input and writes
113 output.  These are the input and output options:
114
115 @table @code
116 @item -f @var{file}
117 @itemx --out-file=@var{file}
118
119 This overrides the output file name for devices designated as listing
120 devices.  If a file named @var{file} already exists, it is overwritten.
121
122 @item -p
123 @itemx --pipe
124
125 Allows PSPP to be used as a filter by causing the syntax file to be
126 read from stdin and output to be written to stdout.  Conflicts with the
127 @code{-f @var{file}} and @code{--file=@var{file}} options.
128
129 @item -I-
130 @itemx --no-include
131
132 Clears all directories from the include path.  This includes all
133 directories put in the include path by default.  @xref{Miscellaneous
134 configuring}.
135
136 @item -I @var{dir}
137 @itemx --include=@var{dir}
138
139 Appends directory @var{dir} to the path that is searched for include
140 files in PSPP syntax files.
141
142 @item -c @var{command}
143 @itemx --command=@var{command}
144
145 Execute literal command @var{command}.  The command is executed before
146 startup syntax files, if any.
147
148 @item --testing-mode
149
150 Invoke heuristics to assist with testing PSPP.  For use by @code{make
151 check} and similar scripts.
152 @end table
153
154 @node Language control options, Informational options, Input and output options, Invocation
155 @section Language control options
156
157 Language control options control how PSPP syntax files are parsed and
158 interpreted.  The available language control options are:
159
160 @table @code
161 @item -i
162 @itemx --interactive
163
164 When a syntax file is specified on the command line, PSPP normally
165 terminates after processing it.  Giving this option will cause PSPP to
166 bring up a command prompt after processing the syntax file.
167
168 In addition, this forces syntax files to be interpreted in interactive
169 mode, rather than the default batch mode.  @xref{Tokenizing lines}, for
170 information on the differences between batch mode and interactive mode
171 command interpretation.
172
173 @item -n
174 @itemx --edit
175 @itemx --dry-run
176 @itemx --just-print
177 @itemx --recon
178
179 Only the syntax of any syntax file specified or of commands entered at
180 the command line is checked.  Transformations are not performed and
181 procedures are not executed.  Not yet implemented.
182
183 @item -r
184 @itemx --no-statrc
185
186 Prevents the execution of the PSPP startup syntax file.  Not yet
187 implemented, as startup syntax files aren't, either.
188
189 @item -s
190 @itemx --safer
191
192 Disables certain unsafe operations.  This includes the ERASE and
193 HOST commands, as well as use of pipes as input and output files.
194 @end table
195
196 @node Informational options,  , Language control options, Invocation
197 @section Informational options
198
199 Informational options cause information about PSPP to be written to
200 the terminal.  Here are the available options:
201
202 @table @code
203 @item -h
204 @item --help
205
206 Prints a message describing PSPP command-line syntax and the available
207 device driver classes, then terminates.
208
209 @item -l
210 @item --list
211
212 Lists the available device driver classes, then terminates.
213
214 @item -x @{compatible|enhanced@}
215 @itemx --syntax=@{compatible|enhanced@}
216
217 If you chose @code{compatible}, then PSPP will only accept command syntax that 
218 is compatible with the proprietary program SPSS.
219 If you choose @code{enhanced} then additional syntax will be available.
220 The default is @code{enhanced}.
221
222
223 @item -V
224 @item --version
225
226 Prints a brief message listing PSPP's version, warranties you don't
227 have, copying conditions and copyright, and e-mail address for bug
228 reports, then terminates.
229
230 @item -v
231 @item --verbose
232
233 Increments PSPP's verbosity level.  Higher verbosity levels cause
234 PSPP to display greater amounts of information about what it is
235 doing.  Often useful for debugging PSPP's configuration.  
236
237 This option can be given multiple times to set the verbosity level to
238 that value.  The default verbosity level is 0, in which no informational
239 messages will be displayed.
240
241 Higher verbosity levels cause messages to be displayed when the
242 corresponding events take place.
243
244 @table @asis
245 @item 1
246
247 Driver and subsystem initializations.
248
249 @item 2
250
251 Completion of driver initializations.  Beginning of driver closings.
252
253 @item 3
254
255 Completion of driver closings.
256
257 @item 4
258
259 Files searched for; success of searches.
260
261 @item 5
262
263 Individual directories included in file searches.
264 @end table
265
266 Each verbosity level also includes messages from lower verbosity levels.
267
268 @end table
269 @setfilename ignored