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