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