Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • import sas issue on 10jan2023 update.

    Hello,

    with update from 15nov2022 to 10jan2023 the import sas no longer works - it fails in just the way noted.

    help whatsnew17 update 10jan2023 #8 is now exactly the problem and has not been fixed. Can I go back to 15nov2022

    8. import sas with certain SAS files exited with error message "error reading file", r(692). This has been fixed.

    So this really frustrating. Any help is appreciated.
    Allen

  • #2
    While you do a service by alerting the community to this problem, I think you should also directly notify StataCorp's technical support team about this problem if you have not already done so.

    Comment


    • #3
      Can you please email [email protected] with the file in question? If the file is too large, tech support can send you a dropbox link to upload the file.

      Thanks,
      Kevin

      Comment


      • #4
        I think there’s something peculiar about your SAS file as I can open the same SAS files before and after this update. I’m sure technical Technical Support will sort it out, but u don’t think this is a blanket “all SAS” files problem. Perhaps there’s compression being used?

        Comment


        • #5
          Thank you all. The SAS file I'm importing today (Stata 17 update 10jan2023) is unchanged compared to yesterday (9 Jan 2023) under Stata 17 update 15nov2022, so there may be a strange change in import sas that inconsistently parses the file. SAS compression is not used herein. As kindly suggested I have contacted tech support.

          Comment


          • #6
            Hi,
            Was any resolution reached on this issue? I am also receiving the "error reading file" with -import sas-... sometimes.
            I am finding that I can -import sas- just fine (>250MB file), unless I use the bcat() option. And then it seems to be something with specific sas7bcat (SAS format) files. Unfortunately the ones that work do not actually contain the labels for the data file. The format file I believe goes with the data provokes the error "r(692) error reading file".

            When the format file does work, there are actually no value labels imported as shown by -label list-.

            Of course I am looking to see if I can make a new format file from SAS, it could be a problem with that file. But I wonder if Stata is expecting certain settings or features in the format file, that I need to set in SAS, but this is not documented.

            In any case, if something was learned about this error and how to avoid it, please post.
            Thanks.

            Comment


            • #7
              OK I think I found the issue. In case it helps someone else--
              SAS format names must have fewer than 8 characters in order for -import sas- to work with the bcat() option.
              (I noticed the converse is also true: in SAS, if using PROC EXPORT to write data to Stata format, an error will occur unless the format names are shorter than 8 characters.)

              At least, I changed all the names of the formats in the SAS library to shorter than 8 characters and import now works. Possibly some longer length might work too but not going to try to find the limits. The SAS formats I was given had some very long names such as VACCINATED3CATFORMAT. When changed to VAX, it worked fine.

              (In SAS you can rename your formats with PROC CATALOG).


              ​​​​​​​

              Comment


              • #8
                Thank you for posting that. I'm sure it will prove helpful to others.

                Comment


                • #9
                  Likewise, I experienced the same issue when importing SPSS files: Files that I could limport with Stata 17, revision 01-jun-2022, are not possible to import since more recent updates ("error reading file", r(692)). I am not sure with which update the change occurred, at any rate since revision 08-mar-2023 or earlier. It may be that an update of the Java Development Kit version (e.g. update 23aug2022, JDK to 17.0.4+8-LTS, update 15nov2022 to JDK 17.0.5+9-LTS, or update 08mar2023 to JDK 17.0.6+10-LTS) is responsible for the issue.

                  I notified Stata's Tech Support in March 2023 and sent them an SPSS data file with this issue (readable with Stata 17, revision 01-jun-2022 but not readable with revision 08-mar-2023), however they were not able to solve the issue (or explain why files that previously were readable can no longer be imported). The problem persists with Stata 18.

                  One should note, however, that this specific problem with SPSS data files is not restricted to Stata: The SPSS files were exported from LimeSurvey (version 5.2.12) and could not be read by SPSS either. However, it is strange that it was possible to read some of the files with this issue using Stata 17, revision 01-jun-2022, but not with Stata 17, revision 08-mar-2023 (or more recent revisions/versions).

                  Comment

                  Working...
                  X