Learning SAS? Welcome to the exclusive online community for all SAS learners.

Data not imported because of encoding wlatin1

Reply
New Contributor
Posts: 4

Data not imported because of encoding wlatin1

Hi,

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;              

                    RUN;

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;

42         ;

43         LIBNAME OUT '/folders/myfolders/Daten';

NOTE: Libref OUT was successfully assigned as follows:

       Engine:        V9

       Physical Name: /folders/myfolders/Daten

44                             FILENAME IN '/folders/myfolders/Daten/prg2.stc';

45                             PROC CIMPORT LIBRARY=OUT INFILE=IN;

46                             RUN;

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

      

47         ;

48         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

58         ;

Thanks,

Martin

Regular Contributor
Posts: 237

Re: Data not imported because of encoding wlatin1

Posted in reply to Nemesis82

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.

New Contributor
Posts: 4

Re: Data not imported because of encoding wlatin1

Posted in reply to djbateman

Thanks so far, I tried this and other options of INENCODING but I got the same error.

Community Manager
Posts: 583

Re: Data not imported because of encoding wlatin1

Posted in reply to Nemesis82

Are you using University Edition? I hope you can provide more detail about what you're trying to do and how!

-
Bev Brown
Visit me on LinkedIn.
Twitter too: @BevBrown
Thank you for using SAS.jpg
N/A
Posts: 1

Re: Data not imported because of encoding wlatin1

Posted in reply to Nemesis82

Martin,

Instead of changing the library encoding try this line for filename.

FILENAME IN '/folders/myfolders/Daten/prg2.stc' ENCODING=WLATIN1;

New Contributor
Posts: 4

Re: Data not imported because of encoding wlatin1

Posted in reply to SPhillips

Hi SPhillips,

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?

Super User
Posts: 11,343

Re: Data not imported because of encoding wlatin1

Posted in reply to Nemesis82

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.

SAS Super FREQ
Posts: 8,866

Re: Data not imported because of encoding wlatin1

Posted in reply to Nemesis82

Hi:

  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_;

run;

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.

cynthia

read_old_PRG2_on_UE.png

may_see_CEDA_messages_just_ignore.png

New Contributor
Posts: 4

Re: Data not imported because of encoding wlatin1

Posted in reply to Cynthia_sas

Hi,

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.

Martin Cebulla

Ask a Question
Discussion stats
  • 8 replies
  • 2227 views
  • 0 likes
  • 6 in conversation