Skip to content

long string variable split when reading in SPSS #236

Description

@ofajardo

hi

When writing a sav SPSS file with Readstat containing long string variables (long_readstat.sav), Readstat reads them correctly, however SPSS splits it (LongString2, "V2_A1", "V2_A2", "V2_A3"), this does not happen if the name of the variable is shorter (LongStr instead of LongString2).
For comparison the same content but written with SPSS (long_spss.sav) it opens correctly both in SPSS and Readstat.

original reports: Roche/pyreadstat#119
Roche/pyreadstat#118

longstring.zip

Activity

  1. mtr commented on Jun 10, 2021

    @mtr

    I experience the same problem. Can someone please have a look at this?

  2. evanmiller commented on Jan 15, 2023

    @evanmiller
    Contributor

    Interesting. It looks like SPSS is using internal names LONGS0, LONGS1, LONGS2 rather than V2_A etc. It looks like the variable-naming algorithm needs to be updated.

  3. ofajardo commented on Feb 23, 2023

    @ofajardo
    Author

    solved in version 1.1.9

  4. ofajardo commented on Feb 23, 2023

    @ofajardo
    Author

    I was made aware that the issue is gone when reading the file with Pyreadstat, however, the issue is still there when reading the file with SPSS.
    Actually I forgot about this difference, now I notice that even I wrote at the first description of this issue that Readstat reads correctly but SPSS does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions