pivot table procedure conceptually works
[pspp] / doc / utilities.texi
1 @node Utilities
2 @chapter Utilities
3
4 Commands that don't fit any other category are placed here.
5
6 Most of these commands are not affected by commands like @cmd{IF} and
7 @cmd{LOOP}:
8 they take effect only once, unconditionally, at the time that they are
9 encountered in the input.
10
11 @menu
12 * ADD DOCUMENT::                Add documentary text to the active dataset.
13 * CACHE::                       Ignored for compatibility.
14 * CD::                          Change the current directory.
15 * COMMENT::                     Document your syntax file.
16 * DOCUMENT::                    Document the active dataset.
17 * DISPLAY DOCUMENTS::           Display active dataset documents.
18 * DISPLAY FILE LABEL::          Display the active dataset label.
19 * DROP DOCUMENTS::              Remove documents from the active dataset.
20 * ECHO::                        Write a string to the output stream.
21 * ERASE::                       Erase a file.
22 * EXECUTE::                     Execute pending transformations.
23 * FILE LABEL::                  Set the active dataset's label.
24 * FINISH::                      Terminate the @pspp{} session.
25 * HOST::                        Temporarily return to the operating system.
26 * INCLUDE::                     Include a file within the current one.
27 * INSERT::                      Insert a file within the current one.
28 * OUTPUT::                      Modify the appearance of the output.
29 * PERMISSIONS::                 Change permissions on a file.
30 * PRESERVE and RESTORE::        Saving settings and restoring them later.
31 * SET::                         Adjust @pspp{} runtime parameters.
32 * SHOW::                        Display runtime parameters.
33 * SUBTITLE::                    Provide a document subtitle.
34 * TITLE::                       Provide a document title.
35 @end menu
36
37 @node ADD DOCUMENT
38 @section ADD DOCUMENT
39 @vindex  ADD DOCUMENT
40
41 @display
42 ADD DOCUMENT 
43     'line one' 'line two' @dots{} 'last line' .
44 @end display
45
46
47 @cmd{ADD DOCUMENT} adds one or more lines of descriptive commentary to 
48 the active dataset.  Documents added in this way are saved to system files.
49 They can be viewed using @cmd{SYSFILE INFO} or @cmd{DISPLAY
50 DOCUMENTS}.  They can be removed from the active dataset with @cmd{DROP
51 DOCUMENTS}.
52
53 Each line of documentary text must be enclosed in quotation marks, and 
54 may not be more than 80 bytes long. @xref{DOCUMENT}.
55
56 @node CACHE
57 @section CACHE
58 @vindex CACHE
59
60 @display
61 CACHE.
62 @end display
63
64 This command is accepted, for compatibility, but it has no effect.
65
66 @node CD
67 @section CD
68 @vindex CD
69 @cindex directory
70 @cindex changing directory
71
72 @display
73 CD 'new directory' .
74 @end display 
75
76 @cmd{CD} changes the current directory.  The new directory will become that specified by the command.
77
78 @node COMMENT
79 @section COMMENT
80 @vindex COMMENT
81 @vindex *
82
83 @display 
84 Two possibles syntaxes:
85         COMMENT comment text @dots{} .
86         *comment text @dots{} .
87 @end display
88
89 @cmd{COMMENT} is ignored.  It is used to provide information to
90 the author and other readers of the @pspp{} syntax file.  
91
92 @cmd{COMMENT} can extend over any number of lines.  Don't forget to
93 terminate it with a dot or a blank line.
94
95
96
97 @node DOCUMENT
98 @section DOCUMENT
99 @vindex DOCUMENT
100
101 @display
102 DOCUMENT @var{documentary_text}.
103 @end display
104
105 @cmd{DOCUMENT} adds one or more lines of descriptive commentary to the
106 active dataset.  Documents added in this way are saved to system files.
107 They can be viewed using @cmd{SYSFILE INFO} or @cmd{DISPLAY
108 DOCUMENTS}.  They can be removed from the active dataset with @cmd{DROP
109 DOCUMENTS}.
110
111 Specify the @var{documentary text} following the @subcmd{DOCUMENT} keyword.  
112 It is interpreted literally --- any quotes or other punctuation marks 
113 will be included in the file.
114 You can extend the documentary text over as many lines as necessary.  
115 Lines are truncated at 80 bytes.  Don't forget to terminate
116 the command with a dot or a blank line. @xref{ADD DOCUMENT}.
117
118 @node DISPLAY DOCUMENTS
119 @section DISPLAY DOCUMENTS
120 @vindex DISPLAY DOCUMENTS
121
122 @display
123 DISPLAY DOCUMENTS.
124 @end display
125
126 @cmd{DISPLAY DOCUMENTS} displays the documents in the active dataset.  Each
127 document is preceded by a line giving the time and date that it was
128 added.  @xref{DOCUMENT}.
129
130 @node DISPLAY FILE LABEL
131 @section DISPLAY FILE LABEL
132 @vindex DISPLAY FILE LABEL
133
134 @display
135 DISPLAY FILE LABEL.
136 @end display
137
138 @cmd{DISPLAY FILE LABEL} displays the file label contained in the
139 active dataset,
140 if any.  @xref{FILE LABEL}.
141
142 This command is a @pspp{} extension.
143
144 @node DROP DOCUMENTS
145 @section DROP DOCUMENTS
146 @vindex DROP DOCUMENTS
147
148 @display
149 DROP DOCUMENTS.
150 @end display
151
152 @cmd{DROP DOCUMENTS} removes all documents from the active dataset.
153 New documents can be added with @cmd{DOCUMENT} (@pxref{DOCUMENT}).
154
155 @cmd{DROP DOCUMENTS} changes only the active dataset.  It does not modify any
156 system files stored on disk.
157
158 @node ECHO
159 @section ECHO
160 @vindex ECHO
161
162 @display 
163 ECHO 'arbitrary text' .
164 @end display
165
166 Use @cmd{ECHO} to write arbitrary text to the output stream. The text should be enclosed in quotation marks following the normal rules for string tokens (@pxref{Tokens}).
167
168 @node ERASE
169 @section ERASE
170 @vindex ERASE
171
172 @display
173 ERASE FILE @var{file_name}.
174 @end display
175
176 @cmd{ERASE FILE} deletes a file from the local filesystem.
177 @var{file_name} must be quoted.
178 This command cannot be used if the SAFER (@pxref{SET}) setting is active.
179
180
181 @node EXECUTE
182 @section EXECUTE
183 @vindex EXECUTE
184
185 @display
186 EXECUTE.
187 @end display
188
189 @cmd{EXECUTE} causes the active dataset to be read and all pending
190 transformations to be executed.
191
192 @node FILE LABEL
193 @section FILE LABEL
194 @vindex FILE LABEL
195
196 @display
197 FILE LABEL @var{file_label}.
198 @end display
199
200 @cmd{FILE LABEL} provides a title for the active dataset.  This
201 title will be saved into system files and portable files that are
202 created during this @pspp{} run.
203
204 @var{file_label} should not be quoted.
205 If quotes are included, they are literally interpreted and become part of the file label.
206
207 @node FINISH
208 @section FINISH
209 @vindex FINISH
210
211 @display
212 FINISH.
213 @end display
214
215 @cmd{FINISH} terminates the current @pspp{} session and returns
216 control to the operating system.
217
218 @node HOST
219 @section HOST
220 @vindex HOST
221
222 @display
223 HOST.
224 HOST COMMAND=['@var{command}'...].
225 @end display
226
227 @cmd{HOST} suspends the current @pspp{} session and temporarily returns control 
228 to the operating system.
229 This command cannot be used if the SAFER (@pxref{SET}) setting is active.
230
231 If the @subcmd{COMMAND} subcommand is specified, as a sequence of shell
232 commands as quoted strings within square brackets, then @pspp{} executes
233 them together in a single subshell.
234
235 If no subcommands are specified, then @pspp{} invokes an interactive
236 subshell.
237
238 @node INCLUDE
239 @section INCLUDE
240 @vindex INCLUDE
241
242 @display
243         INCLUDE [FILE=]'@var{file_name}' [ENCODING='@var{encoding}'].
244 @end display
245
246 @cmd{INCLUDE} causes the @pspp{} command processor to read an
247 additional command file as if it were included bodily in the current
248 command file.
249 If errors are encountered in the included file, then command processing will 
250 stop and no more commands will be processed.
251 Include files may be nested to any depth, up to the limit of available
252 memory.
253
254 The @cmd{INSERT} command (@pxref{INSERT}) is a more flexible
255 alternative to @cmd{INCLUDE}.  An @cmd{INCLUDE} command acts the same as
256 @cmd{INSERT} with @subcmd{ERROR=STOP CD=NO SYNTAX=BATCH} specified.
257
258 The optional @subcmd{ENCODING} subcommand has the same meaning as with @cmd{INSERT}.
259
260 @node INSERT
261 @section INSERT
262 @vindex INSERT
263
264 @display
265      INSERT [FILE=]'@var{file_name}'
266         [CD=@{NO,YES@}]
267         [ERROR=@{CONTINUE,STOP@}]
268         [SYNTAX=@{BATCH,INTERACTIVE@}]
269         [ENCODING=@{LOCALE, '@var{charset_name}'@}].
270 @end display
271
272 @cmd{INSERT} is similar to @cmd{INCLUDE} (@pxref{INCLUDE}) 
273 but somewhat more flexible.
274 It causes the command processor to read a file as if it were embedded in the 
275 current command file.
276
277 If @subcmd{CD=YES} is specified, then before including the file, the
278 current directory  will be changed to the directory of the included
279 file.  
280 The default setting is @samp{CD=NO}.
281 Note that this directory will remain current until it is
282 changed explicitly (with the @cmd{CD} command, or a subsequent
283 @cmd{INSERT} command with the @samp{CD=YES} option).
284 It will not revert to its original setting even after the included
285 file is finished processing.
286
287 If @subcmd{ERROR=STOP} is specified, errors encountered in the
288 inserted file will cause processing to immediately cease.
289 Otherwise processing will continue at the next command.
290 The default setting is @subcmd{ERROR=CONTINUE}.
291
292 If @subcmd{SYNTAX=INTERACTIVE} is specified then the syntax contained in
293 the included file must conform to interactive syntax
294 conventions. @xref{Syntax Variants}.
295 The default setting is @subcmd{SYNTAX=BATCH}.
296
297 @subcmd{ENCODING} optionally specifies the character set used by the included
298 file.  Its argument, which is not case-sensitive, must be in one of
299 the following forms:
300
301 @table @asis
302 @item @subcmd{LOCALE}
303 The encoding used by the system locale, or as overridden by the 
304 @cmd{SET} command (@pxref{SET}).  On GNU/Linux and other Unix-like systems,
305 environment variables, e.g.@: @env{LANG} or @env{LC_ALL}, determine the
306 system locale.
307
308 @item @var{charset_name}
309 One of the character set names listed by @acronym{IANA} at
310 @uref{http://www.iana.org/assignments/character-sets}.  Some examples
311 are @code{ASCII} (United States), @code{ISO-8859-1} (western Europe),
312 @code{EUC-JP} (Japan), and @code{windows-1252} (Windows).  Not all
313 systems support all character sets.
314
315 @item @code{Auto,@var{encoding}}
316 Automatically detects whether a syntax file is encoded in an Unicode
317 encoding such as UTF-8, UTF-16, or UTF-32.  If it is not, then @pspp{}
318 generally assumes that the file is encoded in @var{encoding} (an @acronym{IANA}
319 character set name).  However, if @var{encoding} is UTF-8, and the
320 syntax file is not valid UTF-8, @pspp{} instead assumes that the file
321 is encoded in @code{windows-1252}.
322
323 For best results, @var{encoding} should be an @acronym{ASCII}-compatible
324 encoding (the most common locale encodings are all @acronym{ASCII}-compatible),
325 because encodings that are not @acronym{ASCII} compatible cannot be
326 automatically distinguished from UTF-8.
327
328 @item @code{Auto}
329 @item @code{Auto,Locale}
330 Automatic detection, as above, with the default encoding taken from
331 the system locale or the setting on @subcmd{SET LOCALE}.
332 @end table
333
334 When ENCODING is not specified, the default is taken from the
335 @option{--syntax-encoding} command option, if it was specified, and
336 otherwise it is @code{Auto}.
337
338 @node OUTPUT
339 @section OUTPUT
340 @vindex OUTPUT
341 @cindex precision, of output
342 @cindex decimal places
343
344 @display
345 OUTPUT MODIFY
346        /SELECT TABLES
347        /TABLECELLS SELECT = [ @{SIGNIFICANCE, COUNT@} ]
348                    FORMAT = @var{fmt_spec}.
349 @end display
350 @note{In the above synopsis the characters @samp{[} and @samp{]} are literals.
351 They must appear in the syntax to be interpreted.}
352
353 @cmd{OUTPUT} changes the appearance of the tables in which results are printed.
354 In particular, it can be used to set the format and precision to which results are displayed.
355
356 After running this command, the default table appearance parameters will have been modified and  each 
357 new output table generated will use the new parameters.
358
359 Following @code{/TABLECELLS SELECT =} a list of cell classes must appear, enclosed in square
360 brackets.  This list determines the classes of values should be selected for modification.
361 Each class can be:
362
363 @table @asis
364 @item SIGNIFICANCE
365 Significance of tests (p-values).
366
367 @item COUNT
368 Counts or sums of weights.
369 @end table
370
371 The value of @var{fmt_spec} must be a valid output format (@pxref{Input and Output Formats}).
372 Note that not all possible formats are meaningful for all classes.
373
374 @node PERMISSIONS
375 @section PERMISSIONS
376 @vindex PERMISSIONS
377 @cindex mode
378 @cindex file mode
379 @cindex changing file permissions
380
381 @display
382 PERMISSIONS
383         FILE='@var{file_name}'
384         /PERMISSIONS = @{READONLY,WRITEABLE@}.
385 @end display
386
387 @cmd{PERMISSIONS} changes the permissions of a file.  
388 There is one mandatory subcommand which specifies the permissions to
389 which the file should be changed.  
390 If you set a file's  permission  to @subcmd{READONLY}, then the file will become
391 unwritable either by you or anyone else on the system.
392 If you set the permission to @subcmd{WRITEABLE}, then the file will become
393 writeable by you; the permissions afforded to others will be
394 unchanged.
395 This command cannot be used if the @subcmd{SAFER} (@pxref{SET}) setting is active.
396
397
398 @node PRESERVE and RESTORE
399 @section PRESERVE and RESTORE
400 @vindex PRESERVE
401 @vindex RESTORE
402
403 @display
404 PRESERVE.
405 @dots{}
406 RESTORE.
407 @end display
408
409 @cmd{PRESERVE} saves all of the settings that @cmd{SET} (@pxref{SET})
410 can adjust.  A later @cmd{RESTORE} command restores those settings.
411
412 @cmd{PRESERVE} can be nested up to five levels deep.
413
414 @node SET
415 @section SET
416 @vindex SET
417
418 @display
419 SET
420
421 (data input)
422         /BLANKS=@{SYSMIS,'.',number@}
423         /DECIMAL=@{DOT,COMMA@}
424         /FORMAT=@var{fmt_spec}
425         /EPOCH=@{AUTOMATIC,@var{year}@}
426         /RIB=@{NATIVE,MSBFIRST,LSBFIRST,VAX@}
427         /RRB=@{NATIVE,ISL,ISB,IDL,IDB,VF,VD,VG,ZS,ZL@}
428
429 (interaction)
430         /MXERRS=@var{max_errs}
431         /MXWARNS=@var{max_warnings}
432         /WORKSPACE=@var{workspace_size}
433
434 (syntax execution)
435         /LOCALE='@var{locale}'
436         /MEXPAND=@{ON,OFF@}
437         /MITERATE=@var{max_iterations}
438         /MNEST=@var{max_nest}
439         /MPRINT=@{ON,OFF@}
440         /MXLOOPS=@var{max_loops}
441         /SEED=@{RANDOM,@var{seed_value}@}
442         /UNDEFINED=@{WARN,NOWARN@}
443
444 (data output)
445         /CC@{A,B,C,D,E@}=@{'@var{npre},@var{pre},@var{suf},@var{nsuf}','@var{npre}.@var{pre}.@var{suf}.@var{nsuf}'@}
446         /DECIMAL=@{DOT,COMMA@}
447         /FORMAT=@var{fmt_spec}
448         /WIB=@{NATIVE,MSBFIRST,LSBFIRST,VAX@}
449         /WRB=@{NATIVE,ISL,ISB,IDL,IDB,VF,VD,VG,ZS,ZL@}
450
451 (output routing)
452         /ERRORS=@{ON,OFF,TERMINAL,LISTING,BOTH,NONE@}
453         /MESSAGES=@{ON,OFF,TERMINAL,LISTING,BOTH,NONE@}
454         /PRINTBACK=@{ON,OFF,TERMINAL,LISTING,BOTH,NONE@}
455         /RESULTS=@{ON,OFF,TERMINAL,LISTING,BOTH,NONE@}
456
457 (output driver options)
458         /HEADERS=@{NO,YES,BLANK@}
459         /LENGTH=@{NONE,@var{n_lines}@}
460         /MORE=@{ON,OFF@}
461         /WIDTH=@{NARROW,WIDTH,@var{n_characters}@}
462         /TNUMBERS=@{VALUES,LABELS,BOTH@}
463         /TVARS=@{NAMES,LABELS,BOTH@}
464
465 (logging)
466         /JOURNAL=@{ON,OFF@} ['@var{file_name}']
467
468 (system files)
469         /COMPRESSION=@{ON,OFF@}
470         /SCOMPRESSION=@{ON,OFF@}
471
472 (miscellaneous)
473         /SAFER=ON
474         /LOCALE='@var{string}'
475
476
477 (obsolete settings accepted for compatibility, but ignored)
478         /BOXSTRING=@{'@var{xxx}','@var{xxxxxxxxxxx}'@}
479         /CASE=@{UPPER,UPLOW@}
480         /CPI=cpi_value
481         /HIGHRES=@{ON,OFF@}
482         /HISTOGRAM='@var{c}'
483         /LOWRES=@{AUTO,ON,OFF@}
484         /LPI=@var{lpi_value}
485         /MENUS=@{STANDARD,EXTENDED@}
486         /MXMEMORY=@var{max_memory}
487         /SCRIPTTAB='c'
488         /TB1=@{'@var{xxx}','@var{xxxxxxxxxxx}'@}
489         /TBFONTS='@var{string}'
490         /XSORT=@{YES,NO@}
491 @end display
492
493 @cmd{SET} allows the user to adjust several parameters relating to
494 @pspp{}'s execution.  Since there are many subcommands to this command, its
495 subcommands will be examined in groups.
496
497 For subcommands that take boolean values, @subcmd{ON} and @subcmd{YES} are synonymous, 
498 as are @subcmd{OFF} and @subcmd{NO}, when used as subcommand values.
499
500 The data input subcommands affect the way that data is read from data
501 files.  The data input subcommands are
502
503 @table @asis
504 @item BLANKS
505 @anchor{SET BLANKS}
506 This is the value assigned to an item data item that is empty or
507 contains only white space.  An argument of SYSMIS or '.' will cause the
508 system-missing value to be assigned to null items.  This is the
509 default.  Any real value may be assigned.
510
511 @item DECIMAL
512 @anchor{SET DECIMAL}
513 This value may be set to @subcmd{DOT} or @subcmd{COMMA}.
514 Setting it to @subcmd{DOT} causes the decimal point character to be
515 @samp{.} and the grouping character to be @samp{,}.
516 Setting it to @subcmd{COMMA}
517 causes the decimal point character to be @samp{,} and the grouping
518 character to be @samp{.}.
519 The default value is determined from the system locale.
520
521 @item FORMAT
522 Allows the default numeric input/output format to be specified.  The
523 default is F8.2.  @xref{Input and Output Formats}.
524
525 @item EPOCH
526 @anchor{SET EPOCH}
527 Specifies the range of years used when a 2-digit year is read from a
528 data file or used in a date construction expression (@pxref{Date
529 Construction}).  If a 4-digit year is specified for the epoch, then
530 2-digit years are interpreted starting from that year, known as the
531 epoch.  If @subcmd{AUTOMATIC} (the default) is specified, then the epoch begins
532 69 years before the current date.
533
534 @item RIB
535 @anchor{SET RIB} 
536
537 @pspp{} extension to set the byte ordering (endianness) used for reading
538 data in IB or PIB format (@pxref{Binary and Hexadecimal Numeric
539 Formats}).  In @subcmd{MSBFIRST} ordering, the most-significant byte appears at
540 the left end of a IB or PIB field.  In @subcmd{LSBFIRST} ordering, the
541 least-significant byte appears at the left end.  @subcmd{VAX} ordering is like
542 @subcmd{MSBFIRST}, except that each pair of bytes is in reverse order.  @subcmd{NATIVE},
543 the default, is equivalent to @subcmd{MSBFIRST} or @subcmd{LSBFIRST} depending on the
544 native format of the machine running @pspp{}.
545
546 @item RRB
547 @anchor{SET RRB}
548
549 @pspp{} extension to set the floating-point format used for reading data in
550 RB format (@pxref{Binary and Hexadecimal Numeric Formats}).  The
551 possibilities are:
552
553 @table @asis
554 @item NATIVE
555 The native format of the machine running @pspp{}.  Equivalent to either IDL
556 or IDB.
557
558 @item ISL
559 32-bit IEEE 754 single-precision floating point, in little-endian byte
560 order.
561
562 @item ISB
563 32-bit IEEE 754 single-precision floating point, in big-endian byte
564 order.
565
566 @item IDL
567 64-bit IEEE 754 double-precision floating point, in little-endian byte
568 order.
569
570 @item IDB
571 64-bit IEEE 754 double-precision floating point, in big-endian byte
572 order.
573
574 @item VF
575 32-bit VAX F format, in VAX-endian byte order.
576
577 @item VD
578 64-bit VAX D format, in VAX-endian byte order.
579
580 @item VG
581 64-bit VAX G format, in VAX-endian byte order.
582
583 @item ZS
584 32-bit IBM Z architecture short format hexadecimal floating point, in
585 big-endian byte order.  
586
587 @item ZL
588 64-bit IBM Z architecture long format hexadecimal floating point, in
589 big-endian byte order.
590
591 Z architecture also supports IEEE 754 floating point.  The ZS and ZL
592 formats are only for use with very old input files.
593 @end table
594 The default is NATIVE.
595 @end table
596
597 Interaction subcommands affect the way that @pspp{} interacts with an
598 online user.  The interaction subcommands are
599
600 @table @asis
601 @item MXERRS
602 The maximum number of errors before @pspp{} halts processing of the current
603 command file.  The default is 50.
604
605 @item MXWARNS
606 The maximum number of warnings + errors before @pspp{} halts processing the
607 current command file.  
608 The special value of zero means that all warning situations should be ignored.
609 No warnings will be issued, except a single initial warning advising the user
610 that warnings will not be given.
611 The default value is 100.
612 @end table
613
614 Syntax execution subcommands control the way that @pspp{} commands
615 execute.  The syntax execution subcommands are
616
617 @table @asis
618 @item LOCALE
619 Overrides the system locale for the purpose of reading and writing
620 syntax and data files.  The argument should be a locale name in the
621 general form @code{@var{language}_@var{country}.@var{encoding}}, where @var{language}
622 and @var{country} are 2-character language and country abbreviations,
623 respectively, and @var{encoding} is an @acronym{IANA} character set name.
624 Example locales are @code{en_US.UTF-8} (UTF-8 encoded English as
625 spoken in the United States) and @code{ja_JP.EUC-JP} (EUC-JP encoded
626 Japanese as spoken in Japan).
627
628 @item MEXPAND
629 @itemx MITERATE
630 @itemx MNEST
631 @itemx MPRINT
632 Currently not used.
633
634 @item MXLOOPS
635 The maximum number of iterations for an uncontrolled loop (@pxref{LOOP}).
636 The default @var{max_loops} is 40.
637
638 @item SEED
639 The initial pseudo-random number seed.  Set to a real number or to
640 RANDOM, which will obtain an initial seed from the current time of day.
641
642 @item UNDEFINED
643 Currently not used.
644
645 @item WORKSPACE
646 The maximum amount of memory (in kilobytes) that @pspp{} will use to store data being processed.
647 If memory in excess of the workspace size is required, then @pspp{} will start
648 to use temporary files to store the data.
649 Setting a higher value will, in general, mean procedures will run faster, 
650 but may cause other applications to run slower.
651 On platforms without virtual memory management, setting a very large workspace
652 may cause @pspp{} to abort.
653 @cindex workspace
654 @cindex memory, amount used to store cases
655 @end table
656
657 Data output subcommands affect the format of output data.  These
658 subcommands are
659
660 @table @asis
661 @item CCA
662 @itemx CCB
663 @itemx CCC
664 @itemx CCD
665 @itemx CCE
666 @anchor{CCx Settings}
667
668 Set up custom currency formats.  @xref{Custom Currency Formats}, for
669 details.
670
671 @item DECIMAL
672 The default @subcmd{DOT} setting causes the decimal point character to be
673 @samp{.}.  A setting of @subcmd{COMMA} causes the decimal point character to be
674 @samp{,}.
675
676 @item FORMAT
677 Allows the default numeric input/output format to be specified.  The
678 default is F8.2.  @xref{Input and Output Formats}.
679
680 @item WIB
681 @anchor{SET WIB} 
682
683 @pspp{} extension to set the byte ordering (endianness) used for writing
684 data in IB or PIB format (@pxref{Binary and Hexadecimal Numeric
685 Formats}).  In @subcmd{MSBFIRST} ordering, the most-significant byte appears at
686 the left end of a IB or PIB field.  In @subcmd{LSBFIRST} ordering, the
687 least-significant byte appears at the left end.  @subcmd{VAX} ordering is like
688 @subcmd{MSBFIRST}, except that each pair of bytes is in reverse order.  @subcmd{NATIVE},
689 the default, is equivalent to @subcmd{MSBFIRST} or @subcmd{LSBFIRST} depending on the
690 native format of the machine running @pspp{}.
691
692 @item WRB
693 @anchor{SET WRB}
694
695 @pspp{} extension to set the floating-point format used for writing data in
696 RB format (@pxref{Binary and Hexadecimal Numeric Formats}).  The choices
697 are the same as @subcmd{SET RIB}.  The default is @subcmd{NATIVE}.
698 @end table
699
700 In the @pspp{} text-based interface, the output routing subcommands
701 affect where output is sent.  The following values are allowed for
702 each of these subcommands:
703
704 @table @asis
705 @item OFF
706 @item NONE
707 Discard this kind of output.
708
709 @item TERMINAL
710 Write this output to the terminal, but not to listing files and other
711 output devices.
712
713 @item LISTING
714 Write this output to listing files and other output devices, but not
715 to the terminal.
716
717 @item ON
718 @itemx BOTH
719 Write this type of output to all output devices.
720 @end table
721
722 These output routing subcommands are:
723
724 @table @asis
725 @item ERRORS
726 Applies to error and warning messages.  The default is @subcmd{BOTH}.
727
728 @item MESSAGES
729 Applies to notes.  The default is @subcmd{BOTH}.
730
731 @item PRINTBACK
732 Determines whether the syntax used for input is printed back as part
733 of the output.  The default is @subcmd{NONE}.
734
735 @item RESULTS
736 Applies to everything not in one of the above categories, such as the
737 results of statistical procedures.  The default is @subcmd{BOTH}.
738 @end table
739
740 These subcommands have no effect on output in the @pspp{} GUI
741 environment.
742
743 Output driver option subcommands affect output drivers' settings.  These
744 subcommands are
745
746 @table @asis
747 @item HEADERS
748 @itemx LENGTH
749 @itemx MORE
750 @itemx WIDTH
751 @itemx TNUMBERS
752 The @subcmd{TNUMBERS} option sets the way in which values are displayed in output tables.
753 The valid settings are @subcmd{VALUES}, @subcmd{LABELS} and @subcmd{BOTH}.
754 If @subcmd{TNUMBERS} is set to @subcmd{VALUES}, then all values are displayed with their literal value 
755 (which for a numeric value is a number and for a string value an alphanumeric string).
756 If @subcmd{TNUMBERS} is set to @subcmd{LABELS}, then values are displayed using their assigned labels if any.
757 (@xref{VALUE LABELS}.)
758 If the a value has no label, then it will be displayed using its literal value.
759 If @subcmd{TNUMBERS} is set to @subcmd{BOTH}, then values will be displayed with both their label
760 (if any) and their literal value in parentheses.
761 @item TVARS
762 The @subcmd{TVARS} option sets the way in which variables are displayed in output tables.
763 The valid settings are @subcmd{NAMES}, @subcmd{LABELS} and @subcmd{BOTH}.
764 If @subcmd{TVARS} is set to @subcmd{NAMES}, then all variables are displayed using their names.
765 If @subcmd{TVARS} is set to @subcmd{LABELS}, then variables are displayed using their label if one
766 has been set.  If no label has been set, then the name will be used.
767 (@xref{VARIABLE LABELS}.)
768 If @subcmd{TVARS} is set to @subcmd{BOTH}, then variables will be displayed with both their label
769 (if any) and their name in parentheses.
770 @end table
771
772 @cindex headers
773 @cindex length
774 @cindex more
775 @cindex pager 
776 @cindex width
777 @cindex tnumbers
778
779
780 Logging subcommands affect logging of commands executed to external
781 files.  These subcommands are
782
783 @table @asis
784 @item JOURNAL
785 @itemx LOG
786 These subcommands, which are synonyms, control the journal.  The
787 default is @subcmd{ON}, which causes commands entered interactively to be
788 written to the journal file.  Commands included from syntax files that
789 are included interactively and error messages printed by @pspp{} are also
790 written to the journal file, prefixed by @samp{>}.  @subcmd{OFF} disables use
791 of the journal.
792
793 The journal is named @file{pspp.jnl} by default.  A different name may
794 be specified.
795 @end table
796
797 System file subcommands affect the default format of system files
798 produced by @pspp{}.  These subcommands are
799
800 @table @asis
801 @item COMPRESSION
802 Not currently used.
803
804 @item SCOMPRESSION
805 Whether system files created by @cmd{SAVE} or @cmd{XSAVE} are
806 compressed by default.  The default is @subcmd{ON}.
807 @end table
808
809 Security subcommands affect the operations that commands are allowed to
810 perform.  The security subcommands are
811
812 @table @asis
813 @item SAFER
814 Setting this option disables the following operations:
815
816 @itemize @bullet
817 @item
818 The @cmd{ERASE} command.
819 @item
820 The @cmd{HOST} command.
821 @item
822 The @cmd{PERMISSIONS} command.
823 @item
824 Pipes (file names beginning or ending with @samp{|}).
825 @end itemize
826
827 Be aware that this setting does not guarantee safety (commands can still
828 overwrite files, for instance) but it is an improvement.
829 When set, this setting cannot be reset during the same session, for
830 obvious security reasons.
831
832 @item LOCALE
833 @cindex locale
834 @cindex encoding, characters
835 This item is used to set the default character encoding.
836 The encoding may be specified either as an encoding name or alias
837 (see @url{http://www.iana.org/assignments/character-sets}), or
838 as a locale name.
839 If given as a locale name, only the character encoding of the 
840 locale is relevant.
841
842 System files written by @pspp{} will use this encoding.
843 System files read by @pspp{}, for which the encoding is unknown, will be
844 interpreted using this encoding.
845
846 The full list of valid encodings and locale names/alias are operating system
847 dependent.
848 The following are all examples of acceptable syntax on common GNU/Linux
849 systems.
850 @example
851 SET LOCALE='iso-8859-1'.
852
853 SET LOCALE='ru_RU.cp1251'.
854
855 SET LOCALE='japanese'.
856 @end example
857
858 Contrary to the intuition, this command does not affect any aspect 
859 of the system's locale.
860 @end table
861
862 @node SHOW
863 @section SHOW
864 @vindex SHOW
865
866 @display
867 SHOW
868         [ALL]
869         [BLANKS]
870         [CC]
871         [CCA]
872         [CCB]
873         [CCC]
874         [CCD]
875         [CCE]
876         [COPYING]
877         [DECIMALS]
878         [DIRECTORY]
879         [ENVIRONMENT]
880         [FORMAT]
881         [LENGTH]
882         [MXERRS]
883         [MXLOOPS]
884         [MXWARNS]
885         [N]
886         [SCOMPRESSION]
887         [TEMPDIR]
888         [UNDEFINED]
889         [VERSION]
890         [WARRANTY]
891         [WEIGHT]
892         [WIDTH]
893 @end display
894
895 @cmd{SHOW} can be used to display the current state of @pspp{}'s execution
896 parameters.  Parameters that can be changed using @cmd{SET}
897 (@pxref{SET}), can be examined using @cmd{SHOW} using the subcommand
898 with the same name.  @cmd{SHOW} supports the following additional
899 subcommands:
900
901 @table @asis
902 @item @subcmd{ALL}
903 Show all settings.
904 @item @subcmd{CC}
905 Show all custom currency settings (@subcmd{CCA} through @subcmd{CCE}).
906 @item @subcmd{DIRECTORY}
907 Shows the current working directory.
908 @item @subcmd{ENVIRONMENT}
909 Shows the operating system details.
910 @item @subcmd{N}
911 Reports the number of cases in the active dataset.  The reported number is not
912 weighted.  If no dataset is defined, then @samp{Unknown} will be reported.
913 @item @subcmd{TEMPDIR}
914 Shows the path of the directory where temporary files will be stored.
915 @item @subcmd{VERSION}
916 Shows the version of this installation of @pspp{}.
917 @item @subcmd{WARRANTY}
918 Show details of the lack of warranty for @pspp{}.
919 @item @subcmd{COPYING} / @subcmd{LICENSE}
920 Display the terms of @pspp{}'s copyright licence (@pxref{License}).
921 @end table
922
923 Specifying @cmd{SHOW} without any subcommands is equivalent to @subcmd{SHOW ALL}.
924
925 @node SUBTITLE
926 @section SUBTITLE
927 @vindex SUBTITLE
928
929 @display
930 SUBTITLE '@var{subtitle_string}'.
931   or
932 SUBTITLE @var{subtitle_string}.
933 @end display
934
935 @cmd{SUBTITLE} provides a subtitle to a particular @pspp{}
936 run.  This subtitle appears at the top of each output page below the
937 title, if headers are enabled on the output device.
938
939 Specify a subtitle as a string in quotes.  The alternate syntax that did
940 not require quotes is now obsolete.  If it is used then the subtitle is
941 converted to all uppercase.
942
943 @node TITLE
944 @section TITLE
945 @vindex TITLE
946
947 @display
948 TITLE '@var{title_string}'.
949   or
950 TITLE @var{title_string}.
951 @end display
952
953 @cmd{TITLE} provides a title to a particular @pspp{} run.
954 This title appears at the top of each output page, if headers are enabled
955 on the output device.
956
957 Specify a title as a string in quotes.  The alternate syntax that did
958 not require quotes is now obsolete.  If it is used then the title is
959 converted to all uppercase.