03-04-2015 05:32 AM
I want to Import course data from sas programming 2.
There is a readme file with the following statement that I try to execute:
LIBNAME OUT '/folders/myfolders/Daten';
FILENAME IN '/folders/myfolders/Daten/prg2.stc';
PROC CIMPORTLIBRARY=OUT INFILE=IN;
Library OUT with the tables are created. The tables contain observations so I guess it worked.
But I got an error, what does that mean:
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
43 LIBNAME OUT '/folders/myfolders/Daten';
NOTE: Libref OUT was successfully assigned as follows:
Physical Name: /folders/myfolders/Daten
44 FILENAME IN '/folders/myfolders/Daten/prg2.stc';
45 PROC CIMPORT LIBRARY=OUT INFILE=IN;
ERROR: The transport file was created in the encoding wlatin1. This session encoding, utf-8, can read and create transport files
in the encoding, utf-8. Data not imported.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROZEDUR CIMPORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
48 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
03-04-2015 10:12 AM
I won't claim to be an expert here, but I have had a similar problem in the past with the data format being native to a different host. My workaround has been to add INENCODING=ASCIIANY after the location of the library:
LIBNAME OUT '/folders/myfolders/Daten' inencoding=asciiany;
I don't know if this will help, but maybe you can read the documentation on the INENCODING option in the LIBNAME statement to see if there are other options that might help.
03-11-2015 04:37 AM
thanks for your help. I tried this and now this error doesn't come any more.
All tables are created with content. Now I got the error "Given transport file is bad".
If the transport file is so bad then why the tables are created?!?
I would post the file prg2.stc but I don't know how to open it.
Can I upload a file here?
03-11-2015 04:35 PM
There may be catalogs in the source library that contained graphics, formats, AF programs, menus or other items that may not been imported but the data tables were okay.
03-16-2015 05:28 PM
In your first post, you said that you were trying to import the prg2.stc file so you could use the data from the Programming 2 course. If you have the Programming 2 zip file (it must be fairly old -- we stopped using SAS Transport files several years ago), there should be more files than just the .STC file in your zip archive. We used to give you ALL the SAS datasets (.SAS7BDAT files, like APRSALES.SAS7BDAT and CUSTOMER.SAS7BDAT ) and ALL the "raw" data files (like PHONE.CSV and SEMINAR.DAT) in the zip archive as well AND all the program files, (.SAS files).
So if you have the PRG2.STC file, then you should already have the other files you need for the Programming 2 class. The ONLY reason the STC files were included in the zip archive were primarily for people who were running SAS on the mainframe and needed to do a CIMPORT. But we have had many different versions of Programming 2 over the years, so I don't know which version of Programming 2 you are referencing or how long ago you took the class.
Can you verify the names of some of the other files that are in the zip archive with the PRG2.STC file? In the oldest version of Programming 2, we used fake airline data (International Airlines) and then in more current versions of Programming 2, we use fake sales data from a sports retailer (Orion Sports and Outdoors). There used to be a README.TXT file in the zip archive too. You would need to follow the Windows instructions (not the UNIX instructions, not the z/OS instructions). Basically, you would unzip the zip archive to your shared folder location in a subfolder named something like prg2, like:
'/folders/myfolders/prg2' and then you should be able to:
libname oldorion '/folders/myfolders/oldprg2';
proc contents data=oldorion._all_;
You might get "CEDA" messages, since most of the older datasets were created on a 32 bit system, but you can ignore the CEDA messages.
03-17-2015 04:51 AM
thank you, your post was very helpful.
The Programming 2 data contains the Orion Sports files.
I tried it like you described it and I got the same results that can be seen at your screenshots.
No errors any more.
This discussion can be closed.