SV: Not able to read ancient portable fil (.por) from 1984 - Dataarcheological question

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

SV: Not able to read ancient portable fil (.por) from 1984 - Dataarcheological question

Staffan Lindberg
Thanks for the input David. Maybe this yields additional clues. Running
Import I get the following error message:

>Error # 5735
>The "SPSSPORT" phrase was not found on the IMPORT portable file.  Check
that
>the correct file was used.  There may be an error in the translation table
on
>the portable file, or else the file does not have the standard form of a
>200-character header followed by a 256-character translation table followed
by
>"SPSSPORT".
>Execution of this command stops.

I'm not sure how to make head or tail of this. Any ideas?

best

Staffan Lindberg
Sweden

-----Ursprungligt meddelande-----
Från: SPSSX(r) Discussion [mailto:[hidden email]] För David Marso
Skickat: den 23 juni 2011 13:39
Till: [hidden email]
Ämne: Re: Not able to read ancient portable fil (.por) from 1984 -
Dataarcheological question

Staffan,
Using Syntax:

IMPORT FILE = "full path to file.por".

If that fails you may need to massage the file so it has 80 char record
length.
Sometimes things go FUBAR when moving from one system to another.
HTH, David

--
Staffan Lindberg wrote:

>
> Dear list!
>
>
>
> I have a very old portable file (.por) from 1984. When I try to open
> it in SPSS 19, I automatically trigger the Text Import Wizard. When I
> try to look at it with a text editor I see that the file begins with a
> row of diacritical (not in the English alphabet) letters. Does anyone
> know how to open such a file. I seem to remember that in the early
> days of SPSS there were some problems with portable files, fixable by
> some editing of the beginning string of characters in the file. Anyone
> remember this?
>
>
>
> best
>
>
>
> Staffan Lindberg
>
> Sweden
>


--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Not-able-to-read-ancient-porta
ble-fil-por-from-1984-Dataarcheological-question-tp4517117p4517144.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command SIGNOFF SPSSX-L For a list of
commands to manage subscriptions, send the command INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: SV: Not able to read ancient portable fil (.por) from 1984 - Dataarcheological question

David Marso
Administrator
Hi Staffan,
Creating a portable file from scratch will yield something resembling the following:
You can easily discern the structure and the layout for varnames, labels and data.
I am not sure what some off the gobblygook "/70/1/A5/1/0/5/1/0/CA" between varnames is, but the remainder is fairly obvious.
AFAIK: This format is consistent across all implementations of SPSS since the beginning of time.
HTH, David

data list free / a b c (3f1) alpha (a6).
begin data
1 2 3 case1
4 5 6 case2
7 8 9 case3
2 3 4 case4
5 2 0 case5
6 3 5 case6
end data.
value labels
      a b c  
      1 "one" 2 "two" 3 "three" 4 "four" 5 "five" 6 "six" 7 "seven" 8 "eight" 9 "missing".
missing values all (9).
variable labels
  a "Variable a"
  b "Variable b"
  c "Variable c".
EXPORT OUTFILE "C:\Temp\SPSSPortableTest2.por" .

----------------
ÁâÃÉÉ@â×ââ@×ÖÙã@ÆÉÓÅ@@@@@@@@@@@@@@@@@@@@ASCII SPSS PORT FILE                    
00000-0000-0000-0000--------------------!3#))0303300/240&),%00000000000000000000
0200002'220'&)3000#0000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst
uvwxyz .<(+0&[]!$*);^-/|,%_>?`:#@'="000000~000000000000000000000{}\0000000000000
00000000000000000000000000000000000000000000000000000000SPSSPORTA8/201106236/141
755112/SPSS for Microsoft Windows Relea44/5B/70/1/A5/1/0/5/1/0/CA/Variable a70/1
/B5/1/0/5/1/0/CA/Variable b70/1/C5/1/0/5/1/0/CA/Variable c76/5/ALPHA1/6/0/1/6/0/
C1/ D3/1/A1/B1/C9/1/3/one2/3/two3/5/three4/4/four5/4/five6/3/six7/5/seven8/5/eig
ht9/7/missingF1/2/3/5/case14/5/6/5/case27/8/9/5/case32/3/4/5/case45/2/0/5/case56
/3/5/5/case6ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: SV: Not able to read ancient portable fil (.por) from 1984 - Dataarcheological question

Albert-Jan Roskam
Hi,

You could try using R to open the file (it uses PSPP code under the hood)
library(foreign)
path <- "/home/staffan/archeology/fossils"
df <- read.spss(file.path(path, "myfile.por"))
codefile <- file.path(path, "codefile")
datafile <- file.path(path, "myfile.sav")
write.foreign(df, datafile, codefile, package="SPSS")
 
Other options include Hmisc and Memisc, though you'd have to check if they handle .por

This might also be worth checking out: http://code.activestate.com/recipes/576809-python-reader-for-spss-por-files/

Cheers!!
Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



From: David Marso <[hidden email]>
To: [hidden email]
Sent: Thu, June 23, 2011 8:45:09 PM
Subject: Re: [SPSSX-L] SV: Not able to read ancient portable fil (.por) from 1984 - Dataarcheological question

Hi Staffan,
Creating a portable file from scratch will yield something resembling the
following:
You can easily discern the structure and the layout for varnames, labels and
data.
I am not sure what some off the gobblygook "/70/1/A5/1/0/5/1/0/CA" between
varnames is, but the remainder is fairly obvious.
AFAIK: This format is consistent across all implementations of SPSS since
the beginning of time.
HTH, David

data list free / a b c (3f1) alpha (a6).
begin data
1 2 3 case1
4 5 6 case2
7 8 9 case3
2 3 4 case4
5 2 0 case5
6 3 5 case6
end data.
value labels
      a b c
      1 "one" 2 "two" 3 "three" 4 "four" 5 "five" 6 "six" 7 "seven" 8
"eight" 9 "missing".
missing values all (9).
variable labels
  a "Variable a"
  b "Variable b"
  c "Variable c".
EXPORT OUTFILE "C:\Temp\SPSSPortableTest2.por" .

----------------
ÁâÃÉÉ@â×ââ@×ÖÙã@ÆÉÓÅ@@@@@@@@@@@@@@@@@@@@ASCII SPSS PORT FILE
00000-0000-0000-0000--------------------!3#))0303300/240&),%00000000000000000000
0200002'220'&)3000#0000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst
uvwxyz
.<(+0&[]!$*);^-/|,%_>?`:#@'="000000~000000000000000000000{}\0000000000000
00000000000000000000000000000000000000000000000000000000SPSSPORTA8/201106236/141
755112/SPSS for Microsoft Windows Relea44/5B/70/1/A5/1/0/5/1/0/CA/Variable
a70/1
/B5/1/0/5/1/0/CA/Variable b70/1/C5/1/0/5/1/0/CA/Variable
c76/5/ALPHA1/6/0/1/6/0/
C1/
D3/1/A1/B1/C9/1/3/one2/3/two3/5/three4/4/four5/4/five6/3/six7/5/seven8/5/eig
ht9/7/missingF1/2/3/5/case14/5/6/5/case27/8/9/5/case32/3/4/5/case45/2/0/5/case56
/3/5/5/case6ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/SV-Not-able-to-read-ancient-portable-fil-por-from-1984-Dataarcheological-question-tp4517400p4518571.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: SV: Not able to read ancient portable fil (.por) from 1984 - Dataarcheological question

David Marso
Administrator
I requested and received the "POR" file from Staffan off list and upon examination it does not  resemble a POR file.  It is likely an old 'system file' which was renamed as POR.  

Albert-Jan Roskam wrote
Hi,

You could try using R to open the file (it uses PSPP code under the hood)
library(foreign)
path <- "/home/staffan/archeology/fossils"
df <- read.spss(file.path(path, "myfile.por"))
codefile <- file.path(path, "codefile")
datafile <- file.path(path, "myfile.sav")

write.foreign(df, datafile, codefile, package="SPSS")
 
Other options include Hmisc and Memisc, though you'd have to check if they
handle .por

This might also be worth checking out:
http://code.activestate.com/recipes/576809-python-reader-for-spss-por-files/

Cheers!!
Albert-Jan


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public
order, irrigation, roads, a fresh water system, and public health, what have the
Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




________________________________
From: David Marso <[hidden email]>
To: [hidden email]
Sent: Thu, June 23, 2011 8:45:09 PM
Subject: Re: [SPSSX-L] SV: Not able to read ancient portable fil (.por)              
from 1984 -              Dataarcheological question

Hi Staffan,
Creating a portable file from scratch will yield something resembling the
following:
You can easily discern the structure and the layout for varnames, labels and
data.
I am not sure what some off the gobblygook "/70/1/A5/1/0/5/1/0/CA" between
varnames is, but the remainder is fairly obvious.
AFAIK: This format is consistent across all implementations of SPSS since
the beginning of time.
HTH, David

data list free / a b c (3f1) alpha (a6).
begin data
1 2 3 case1
4 5 6 case2
7 8 9 case3
2 3 4 case4
5 2 0 case5
6 3 5 case6
end data.
value labels
      a b c
      1 "one" 2 "two" 3 "three" 4 "four" 5 "five" 6 "six" 7 "seven" 8
"eight" 9 "missing".
missing values all (9).
variable labels
  a "Variable a"
  b "Variable b"
  c "Variable c".
EXPORT OUTFILE "C:\Temp\SPSSPortableTest2.por" .

----------------
ÁâÃÉÉ@â×ââ@×ÖÙã@ÆÉÓÅ@@@@@@@@@@@@@@@@@@@@ASCII SPSS PORT FILE
00000-0000-0000-0000--------------------!3#))0303300/240&),%00000000000000000000
0200002'220'&)3000#0000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst
uvwxyz
.<(+0&[]!$*);^-/|,%_>?`:#@'="000000~000000000000000000000{}\0000000000000
00000000000000000000000000000000000000000000000000000000SPSSPORTA8/201106236/141
755112/SPSS for Microsoft Windows Relea44/5B/70/1/A5/1/0/5/1/0/CA/Variable
a70/1
/B5/1/0/5/1/0/CA/Variable b70/1/C5/1/0/5/1/0/CA/Variable
c76/5/ALPHA1/6/0/1/6/0/
C1/
D3/1/A1/B1/C9/1/3/one2/3/two3/5/three4/4/four5/4/five6/3/six7/5/seven8/5/eig
ht9/7/missingF1/2/3/5/case14/5/6/5/case27/8/9/5/case32/3/4/5/case45/2/0/5/case56
/3/5/5/case6ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/SV-Not-able-to-read-ancient-portable-fil-por-from-1984-Dataarcheological-question-tp4517400p4518571.html

Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"