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

Help please

Reply
New Contributor
Posts: 3

Help please

Hello,

  I am trying to work on the sas Programming 1: Essential E-course and I am having troubles getting through it because everytime that I try out the practice partions the code is not working properly in SAS studio. For example this is the code that I am trying to have sas read :

libname mydata '/folders/myfolders/data';

data work.newsalesemps;

   length First_Name $ 12

          Last_Name $ 18 Job_Title $ 25;

   infile '/folders/myfolders/data/newsalesemps.sas7bdat';

   input First_Name $ Last_Name $ 

         Job_Title $ Salary;

run;

However , when I run it the following message comes out :

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

42 ;

43 libname mydata '/folders/myfolders/data';

NOTE: Libref MYDATA was successfully assigned as follows:

  Engine: V9

  Physical Name: /folders/myfolders/data

44 

45 data work.newsalesemps;

46 length First_Name $ 12

47 Last_Name $ 18 Job_Title $ 25;

48 infile '/folders/myfolders/data/newsalesemps.sas7bdat';

49 input First_Name $ Last_Name $

50 Job_Title $ Salary;

51 

52 ;

53 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

56 ;*';*";*/;QUIT;RUN;

  ____

  180

ERROR 180-322: Statement is not valid or it is used out of proper order.

WARNING: The data set WORK.NEWSALESEMPS may be incomplete. When this step was stopped there were 0 observations and 4 variables.

63 ;

Also , I was exploring the software and I noticed that in the task tab the options are have a little lock in the icon is this normal ? Thank you for the help.

Respected Advisor
Posts: 3,124

Re: Help please

The file you tried to access is already a SAS table. You can't "infile" it. Just open your library "mydata", it should be right there for you.

Regards,

Haikuo

Ask a Question
Discussion stats
  • 1 reply
  • 397 views
  • 0 likes
  • 2 in conversation