BookmarkSubscribeRSS Feed
Tom
Super User Tom
Super User

These two lines are generated by PROC IMPORT to set a macro variable for its use. You do NOT need to include those.  

  %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
  if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */

The text <path> in this line is just to remind you to replace that with the actual name of the file.

  infile '<path>/Data_projet_AFRIQUE1.txt' delimiter = ';' MISSOVER DSD lrecl=32767 firstobs=2;

Path is computerese for directory or folder.  You need to use the full name of the file so the INFILE statement can find the file.

 

Do NOT use the code generated by PROC IMPORT as if it is a good example of how you should write your code.  It does a lot of useless (and potentially harmful) things.  Instead of defining the variables it attaching formats and informats to the variables and counts on SAS's guessing to define the variable with the right type and length based on the type and width of the format that is attached. It attaches formats and informats to variables that don't need them. It includes $ in the INPUT statement even though the variables types have already been determined before the input statement. 

The only reason to use it is because it might help you since the proc as already taken the time to figure names for the variables.  

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 15 replies
  • 2885 views
  • 2 likes
  • 5 in conversation