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".
10 @node Invoking pspp-convert
11 @chapter Invoking @command{pspp-convert}
13 @cindex @command{pspp-convert}
15 @command{pspp-convert} is a command-line utility accompanying
16 @pspp{}. It reads an SPSS or SPSS/PC+ system file or SPSS portable
17 file or encrypted SPSS syntax file @var{input} and
18 writes a copy of it to another @var{output} in a different format.
22 @t{pspp-convert} [@var{options}] @var{input} @var{output}
24 @t{pspp-convert -@w{-}help}
26 @t{pspp-convert -@w{-}version}
29 The format of @var{input} is automatically detected, when possible.
30 The character encoding of old SPSS system files cannot always be
31 guessed correctly, and SPSS/PC+ system files do not include any
32 indication of their encoding. Use @code{-e @var{encoding}} to specify
33 the encoding in this case.
35 By default, the intended format for @var{output} is inferred based on its
41 Comma-separated value. Each value is formatted according to its
42 variable's print format. The first line in the file contains variable
53 SPSS syntax file. (Only encrypted syntax files may be converted to
57 @command{pspp-convert} can convert most input formats to most output
58 formats. Encrypted SPSS file formats are exceptions: if the input
59 file is in an encrypted format, then the output file will be the same
60 format (decrypted). To decrypt such a file, specify the encrypted
61 file as @var{input}. The output will be the equivalent plaintext
62 file. Options for the output format are ignored in this case.
64 The password for encrypted files can be specified a few different
65 ways. If the password is known, use the @option{-p} option
66 (documented below) or allow @command{pspp-convert} to prompt for it.
67 If the password is unknown, use the @option{-a} and @option{-l}
68 options to specify how to search for it, or @option{--password-list}
69 to specify a file of passwords to try.
71 Use @code{-O format=@var{format}} to override the inferred format or to
72 specify the format for unrecognized extensions.
74 @command{pspp-convert} accepts the following options:
77 @item @option{-O format=@var{format}}
78 Overrides the format inferred from the output file's extension. Use
79 @option{--help} to list the available formats. @xref{Invoking PSPP},
80 for details of the available output formats.
82 @item @option{-O @var{option}=@var{value}}
83 Sets an option for the output file format. @xref{Invoking PSPP}, for
84 details of the available output options.
86 @item -c @var{maxcases}
87 @itemx --cases=@var{maxcases}
88 By default, all cases are copied from @var{input} to @var{output}.
89 Specifying this option to limit the number of cases written to
90 @var{output} to @var{maxcases}.
92 @item -e @var{charset}
93 @itemx --encoding=@var{charset}
94 Overrides the encoding in which character strings in @var{input} are
95 interpreted. This option is necessary because old SPSS system files,
96 and SPSS/PC+ system files, do not self-identify their encoding.
98 @item -p @var{password}
99 @item --password=@var{password}
100 Specifies the password to use to decrypt an encrypted SPSS system file
101 or syntax file. If this option is not specified,
102 @command{pspp-convert} will prompt interactively for the password as
105 Be aware that command-line options, including passwords, may be
106 visible to other users on multiuser systems.
108 When used with @option{-a} (or @option{--password-alphabet}) and
109 @option{-l} (or @option{--password-length}), this option specifies the
110 starting point for the search. This can be used to restart a search
111 that was interrupted.
113 @item -a @var{alphabet}
114 @item --password-alphabet=@var{alphabet}
115 Specifies the alphabet of symbols over which to search for an
116 encrypted file's password. @var{alphabet} may include individual
117 characters and ranges delimited by @samp{-}. For example, @option{-a
118 a-z} searches lowercase letters, @option{-a A-Z0-9} searches uppercase
119 letters and digits, and @option{-a ' -~'} searches all printable ASCII
122 @item -l @var{max-length}
123 @item --password-length=@var{max-length}
124 Specifies the maximum length of the passwords to try.
126 @item --password-list=@var{file}
127 Specifies a file to read containing a list of passwords to try, one
128 per line. If @var{file} is @file{-}, reads from stdin.
132 Prints a usage message on stdout and exits.
136 Prints version information on stdout and exits.