Invoking pspp-convert
*********************

pspp-convert is a command-line utility accompanying pspp. It reads an SPSS or SPSS/PC+ system file or SPSS portable file or encrypted SPSS syntax file INPUT and writes a copy of it to another OUTPUT in a different format. Synopsis:

     pspp-convert [OPTIONS] INPUT OUTPUT

     pspp-convert --help

     pspp-convert --version

The format of INPUT is automatically detected, when possible. The character encoding of old SPSS system files cannot always be guessed correctly, and SPSS/PC+ system files do not include any indication of their encoding.  Use -e ENCODING to specify the encoding in this case.

By default, the intended format for OUTPUT is inferred based on its extension:

csv
txt
     Comma-separated value.  Each value is formatted according to its variable's print format.  The first line in the file contains variable names.

sav

sys
     SPSS system file.

por
     SPSS portable file.

sps
     SPSS syntax file.  (Only encrypted syntax files may be converted to this format.)

pspp-convert can convert most input formats to most output formats.  Encrypted SPSS file formats are exceptions: if the input file is in an encrypted format, then the output file will be the same format (decrypted).  To decrypt such a file, specify the encrypted file as INPUT.  The output will be the equivalent plaintext file.  Options for the output format are ignored in this case.

The password for encrypted files can be specified a few different ways.  If the password is known, use the -p option (documented below) or allow pspp-convert to prompt for it. If the password is unknown, use the -a and -l options to specify how to search for it, or --password-list to specify a file of passwords to try.

Use -O EXTENSION to override the inferred format or to specify the format for unrecognized extensions.

The following options are accepted:

-O FORMAT
--output-format=FORMAT
     Specifies the desired output format.  FORMAT must be one of the extensions listed above, e.g. -O csv requests comma-separated value output.

-c MAXCASES
--cases=MAXCASES
     By default, all cases are copied from INPUT to OUTPUT. Specifying this option to limit the number of cases written to OUTPUT to MAXCASES.

-e CHARSET
--encoding=CHARSET
     Overrides the encoding in which character strings in INPUT are interpreted.  This option is necessary because old SPSS system files, and SPSS/PC+ system files, do not self-identify their encoding.

-p PASSWORD

--password=PASSWORD
     Specifies the password to use to decrypt an encrypted SPSS system file or syntax file.  If this option is not specified, pspp-convert will prompt interactively for the password as necessary.

     Be aware that command-line options, including passwords, may be visible to other users on multiuser systems.

     When used with -a (or --password-alphabet) and -l (or --password-length), this option specifies the starting point for the search.  This can be used to restart a search that was interrupted.

-a ALPHABET

--password-alphabet=ALPHABET
     Specifies the alphabet of symbols over which to search for an encrypted file's password.  ALPHABET may include individual characters and ranges delimited by -.  For example, -a a-z searches lowercase letters, -a A-Z0-9 searches uppercase letters and digits, and -a ' -~' searches all printable ASCII characters.

-l MAX-LENGTH

--password-length=MAX-LENGTH
     Specifies the maximum length of the passwords to try.

--password-list=FILE
     Specifies a file to read containing a list of passwords to try, one per line.  If FILE is -, reads from stdin.

-h
--help
     Prints a usage message on stdout and exits.

-v
--version
     Prints version information on stdout and exits.