Attached here is my very simple code to read in .sav files into SAS for analysis.
PROC IMPORT
DATAFILE='C:\Users\Desktop\Iliu_SAS_Files_Relocated\0310_HPV-Boys\SPSS Files\BoyVacuptake.sav'
OUT=work.BoyVacuptake
DBMS=SAV REPLACE;
The error code that I keep getting is:
ERROR: DBMS type SAV not valid for import.
I am running SAS 9.4 which should allow me to import/export SPSS files using the DBMS=SAV option. Does anyone know why I may be getting this error? Or any fixes?
I've tried using the DBMS=SPSS option as well, same error. Probably going to try to just read everything into R and export into SAS from there. Need to convert everything to a .sas7bdat file. The .sav files are from an external partner, I do not have access to SPSS to just save the data in a different format.
First make sure you have SAS/Access to PC Files licensed and installed. Run PROC SETINIT to see what you have licensed.
Second try using SPSS as the DBMS= setting as this documentation page says:
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acpcref/n1h6b01uh0dm2yn1fpq85gjgwcfs.htm
Importing and Exporting SPSS Files
SPSS Files (DBMS=SPSS)
The IMPORT and EXPORT procedures support two DBMS= identifiers for SPSS .sav files. The DBMS=SPSS specification uses SPSS file formats to access data in SPSS .sav files on UNIX and Microsoft Windows operating platforms.
Related
I have Microsoft Office Professional Plus 2019 and Access database engine both 64-bit installed on my machine and was trying to import a CSV file to Analysis Services Tabular project. However keep getting the error message shown below.
"Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: The Microsoft Access database engine cannot open or write to the file 'BatchInfo.csv'. It is already opened exclusively by another user, or you need permission to view and write its data.; 3051."
Any help is appreciated please.
Either you or someone else has the file open. Sometimes you have to completely close out of the program that created the file, or the last program used to read, write, or save the file.
If it's something on your computer, you may be able to find what has it opened with the Process Explorer tool. Install it, and then use Find > Find Handle or DLL... and search on "BatchInfo.csv".
I have installed pycparser that parses C code.
Using pycparser I want to parse an open source project, namely PostgreSQL . However, during compilation it cannot found some header files, namely
pg_config_ext.h and pg_config_os.h.
While looking at the directory structure of PostgreSQL, I find that it does not have these header files. How to fix this issue?
These header files are generated from the respective .in files when configure is run.
This will allow conditional compilation depending on the operating system and its configuration.
To compile PostgreSQL, you need what is called a configured source tree in PostgreSQL jargon.
Also note that the build process is somewhat different on Windows, see the documentation for details.
I'm attempting to into import oracle 11gR2 using the command line tool for SqlDeveloper 4.0. The ultimate reason is we are attempting to import a lot of freetext fields that need to preserve the exact formatting. CR LF, etc for legal reasons. End users need to edit these in Excel.
SQLLoader baulks at the CR LF's, You can achieve this in SqlDeveloper by switching the formatting to UTF-8 for import / export. We are now trying to build up some scripts after discovering how to do this in the command line runtime sdcli64... BUT there doesn't appear to be an option to import from a flat file or .xlsx in that utility??
Any pointers or are we missing an obvious parameter?
(we are using the latest version of SqlDeveloper we can find, 4.03)
Cheers,
Chris
New version of Oracle developer 4.1 was released as an Early adopter today. You can run the sdcli or sdcli64 command line version with the new parameters. This will import excel files as possible in the sqlDeveloper GUI and it will preserve the formatting using the new [-utility] switch.
You can then use the scripting tool/method of choice to build scripts to do all files in a directory, etc.
With new SQL Developer 4.1 you may import XLSX file (and other formats too) via command line:
Use sdcli utility import.
You will need a config XML file. To create one, start the import in the UI, configure the columns, etc, and at the last step click the button 'Save State'. It will create an XML file you may re-use in command line.
How would you import an online xls file in SAS ?
I tried
proc import
out=test
datafile='//statbel.fgov.be/fr/binaries/311111Population%20de%20droit%201990-2011_fr_tcm326-55771.xls'
dbms=excel
replace;
run;quit;
ERROR: DBMS type EXCEL not valid for import.
I also tried DBMS=xls and DBMS=XLSX
SAS 9.3 in SAS enterprise guide 5.1
Operating System: WX64_SV .
---Base SAS Software
---SAS/STAT
---SAS/GRAPH
---SAS/ETS
---SAS/CONNECT
---SAS/IntrNet
---SAS Integration Technologies
---SAS/ACCESS Interface to ODBC
---SAS Workspace Server for Local Access
---SAS Workspace Server for Enterprise Access
---DataFlux Trans DB Driver
---SAS Framework Data Server
---SAS Add-in for Microsoft Excel
---SAS Add-in for Microsoft Outlook
---SAS Add-in for Microsoft PowerPoint
---SAS Add-in for Microsoft Word
You don't license SAS/ACCESS to PC FILES, so you can't use PROC IMPORT with DBMS=EXCEL. You will need to import it using point-and-click in Enterprise Guide, license the software, or download it and save it as CSV or similar format (or obtain it in a different format).
The answer is given by Chris#SAS in this forum:
https://communities.sas.com/message/194367#194367
1 use SAS to copy the file from the web to a path on your SAS Workspace
2 use SAS Enterprise Guide and the Import Data task to create the SAS data set.
I have an old in DOS program (1) with Raima(db_vista) database and i must
create import data from program (1) to other program (2).
Program (1) has *.dat and *.key files, but i can't find *.dbd file. Is it
possible that file *.dbd not exists? Can it be compiled in EXE?
Is it possible export data to .txt files from .key and .dat files when dbd
file not exists?
My program (2) must import this data...
Best regards
(sorry for my poor english)
Omega
We use RAIMA extensively at work. Any RAIMA version before ~4.5 should have a DBD file (all newer ones might as well). If your program executes, it must be accessing the DBD file somehow. Do you have the source code available?