2
votes

I'm trying to move a SAS dataset over to our Linux server from a client. They created it on SAS 9.4, 64-bit on Windows 7. I'm using SAS 9.4, 64-bit on Linux.

If I do

proc datasets library=din;
run;

I get the following in my log

Libref             DIN                                
Engine             V9                                 
Physical Name      /sasUsr/DM/DATA/SAS_DATA/201510_SSI
Filename           /sasUsr/DM/DATA/SAS_DATA/201510_SSI
Inode Number       46358529                           
Access Permission  rwxrwxr-x                          
Owner Name         cvandenb                           
File Size (bytes)  4096       

                    Member     File
#  Name             Type       Size  Last Modified

1  SAMPLE_FROM_SSI  DATA     131072  09/14/2015 17:07:01        
2  TEST             DATA     131072  09/15/2015 09:35:59        
15         run;

but when I do

data test;
    set din.sample_from_SSI;
run;

I get

18         data test;
19          set din.sample_from_SSI;
ERROR: File DIN.SAMPLE_FROM_SSI.DATA does not exist.
20         run;

I also created a dummy dataset din.test and was able to proc print it. This seems to either be a version compatibility issue or transmission issue. I thought this would be straightforward. Any suggestions? I'm moving the file from windows to Linux with WinSCP. I'd rather not have to request a .csv and create the input statement, but will if I have to. Your help is appreciated.

Thanks, Cory

4

4 Answers

2
votes

I usually get a note about CEDA in this case not missing data.

Create either a CPORT or XPORT file using the associated proc, PROC CPORT or XPORT and then move that file.

Try referring to the data with all caps as well, which I don't think should be the issue, but is possible.

2
votes

If you are talking about an actual SAS dataset then make sure that the name of the file is in all lowercase letters and has the extension of .sas7bdat. If the source file from Windows did not have an extension of .sas7bdat then perhaps you are not dealing with a SAS dataset, but some other type of file.

In SAS code it does not matter whether you reference a dataset using upper or lower case letters. So you can reference a datasets as sample_from_SSI or Sample_From_Ssi to refer to the same file. The same is true of general filenames on a Windows machine. But on Unix system file names with different use of upper and lower case letters are distinct files. SAS requires that the filename of a SAS dataset must be in all lowercase letters.

So if you write:

libname DIN '/sasUsr/DM/DATA/SAS_DATA/201510_SSI';
proc print data=DIN.SAMPLE_FROM_SSI;
run;

Then you are looking to make a listing of the data in a file named:

/sasUsr/DM/DATA/SAS_DATA/201510_SSI/sample_from_ssi.sas7bdat
0
votes

I would try using PROC COPY directly on the libname, as you can select memtype=data that way without explicitly specifying the file.

If SAS still can't do that, then you might have a permissions issue or something else that is outside of the SAS realm I suspect.

0
votes

Try using PROC CPORT and PROC CIMPORT.

  1. Use the CPORT Procedure to convert the file into a transport file.

  2. Use the CIMPORT Procedure to convert the transport file to a SAS format.

There is an example that sounds similar to what you are doing here.

According to SAS, the general procedure is:

  1. A transport file is created at the source computer using PROC CPORT.
  2. The transport file is transferred from the source computer to the target computer via communications software or a magnetic medium
  3. The transport file is read at the target computer using PROC CIMPORT.

Note: Transport files that are created using PROC CPORT are not interchangeable with transport files that are created using the XPORT engine.

If that doesn't work, or it is taking a very long time to figure out, it would be faster to ask them for a CSV and import it directly using PROC IMPORT. It should read in quite easily, especially if it comes from PROC EXPORT.