Add support for reading and writing SPV files.
[pspp] / utilities / pspp-convert.1
1 .\" -*- nroff -*-
2 .de IQ
3 .  br
4 .  ns
5 .  IP "\\$1"
6 ..
7 .TH pspp\-convert 1 "October 2013" "PSPP" "PSPP Manual"
8 .
9 .SH NAME
10 pspp\-convert \- convert SPSS data files to other formats
11 .
12 .SH SYNOPSIS
13 \fBpspp\-convert\fR [\fIoptions\fR] \fIinput\fR \fIoutput\fR
14 .br
15 \fBpspp\-convert \-\-help\fR | \fB\-h\fR
16 .br
17 \fBpspp\-convert \-\-version\fR | \fB\-v\fR
18 .
19 .SH DESCRIPTION
20 The \fBpspp\-convert\fR program reads \fIinput\fR, which may be an
21 SPSS system file, an SPSS/PC+ system file, an SPSS portable file,
22 or an encrypted SPSS syntax file,
23 and writes it to \fIoutput\fR, performing format conversion as
24 necessary.
25 .PP
26 The format of \fIinput\fR is automatically detected, when possible.
27 The character encoding of old SPSS system files cannot always be
28 guessed correctly, and SPSS/PC+ system files do not include any
29 indication of their encoding.  Use \fB\-e \fIencoding\fR to specify
30 the encoding in this case.
31 .PP
32 By default, the intended format for \fIoutput\fR is inferred from its
33 extension:
34 .
35 .IP \fBcsv\fR
36 .IQ \fBtxt\fR
37 Comma-separated value.  Each value is formatted according to its
38 variable's print format.  The first line in the file contains variable
39 names.
40 .
41 .IP \fBsav\fR
42 .IQ \fBsys\fR
43 SPSS system file.
44 .
45 .IP \fBpor\fR
46 SPSS portable file.
47 .
48 .IP \fBsps\fR
49 SPSS syntax file.  (Only encrypted syntax files may be converted to
50 this format.)
51 .
52 .PP
53 Use \fB\-O \fIextension\fR to override the inferred format or to
54 specify the format for unrecognized extensions.
55 .
56 .PP
57 \fBpspp\-convert\fR 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).  Options for the output format are ignored in this
61 case.
62 .
63 .SH "OPTIONS"
64 .SS "General Options"
65 .
66 .IP "\fB\-O format\fR"
67 .IQ "\fB\-\-output\-format=\fIformat\fR"
68 Specifies the desired output format.  \fIformat\fR must be one of the
69 extensions listed above, e.g. \fB\-O csv\fR requests comma-separated
70 value output.
71 .
72 .IP "\fB\-c \fImaxcases\fR"
73 .IQ "\fB\-\-cases=\fImaxcases\fR"
74 By default, all cases are copied from \fIinput\fR to \fIoutput\fR.
75 Specifying this option to limit the number of cases written to
76 \fIoutput\fR to \fImaxcases\fR.
77 .
78 .IP "\fB\-e \fIcharset\fR"
79 .IQ "\fB\-\-encoding=\fIcharset\fR"
80 Overrides the encoding in which character strings in \fIinput\fR are
81 interpreted.  This option is necessary because old SPSS system files
82 do not self-identify their encoding.
83 .
84 .SS "Password Options"
85 When the input file is encrypted, \fBpspp\-convert\fR needs to obtain
86 a password to decrypt it.  To do so, the user may specify the password
87 with \f\-p\fR (or \fB\-\-password), or the name of a file containing a
88 list of possible passwords with \fB\-\-password\-list\fR, or an
89 alphabet of possible passwords to try along with a maximum length with
90 \fB\-a\fR (or \fB\-\-password\-alphabet\fR) and \fB\-l\fR (or
91 \-\-password\-length\fR).  If none of these options is used,
92 \fBpspp\-convert\fR prompts for the password.  The password options
93 are:
94 .
95 .IP "\fB\-p \fIpassword\fR"
96 .IQ "\fB\-\-password=\fIpassword\fR"
97 Specifies the password to use to decrypt the input file.
98 .
99 .IP
100 On multiuser systems, this option may not be safe because other users
101 may be able to see the password in process listings.
102 .
103 .IP "\fB\-a \fIalphabet \fB\-l \fImax-length\fR"
104 .IQ "\fB\-\-password-alphabet=\fIalphabet\ \fB\-\-password-length=\fImax-length\fR"
105 These options are an alternative to \fB\-p\fR or \fB\-\-password\fR.
106 They direct \fBpspp\-convert\fR to search for the correct password
107 from the set of all passwords of symbols from \fIalphabet\fR (which
108 may contain character ranges specified with \fB-\fR) and no more than
109 \fImax-length\fR symbols long.  For example, \fB\-a a-z \-l 5\fR
110 checks all possible lowercase alphabetic passwords no more than 5
111 characters long.
112 .IP
113 When these options are used, \fB\-p\fR may additionally specify a
114 starting point for the search.
115 .
116 .IP "\fB\-\-password\-list=\fIfile\fR"
117 Specifies a file to read containing a list of passwords to try, one
118 per line.  If \fIfile\fR is \fB\-\fR, reads from stdin.
119 .
120 .SS "Other Options"
121 .IP "\fB\-h\fR"
122 .IQ "\fB\-\-help\fR"
123 Prints a usage message on stdout and exits.
124 .
125 .IP "\fB\-v\fR"
126 .IQ "\fB\-\-version\fR"
127 Prints version information on stdout and exits.
128 .
129 .SH "AUTHORS"
130 Ben Pfaff.
131 .
132 .SH "SEE ALSO"
133 .
134 .BR pspp\-output (1),
135 .BR pspp (1),
136 .BR psppire (1).