BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
fpedrozam
Calcite | Level 5

Hi! Could you help me with the problem below. Appreciate.

 

proc contents data='D:\Projetos\SAS_Oficial_Online\EPG1V2_EG\data\pg1v2_eg.sas';

run;

 

 

1 The SAS System segunda-feira, 21 de dezembro de 2020 21h05min00s

1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='Program';
4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5 %LET _CLIENTPROJECTPATH='';
6 %LET _CLIENTPROJECTPATHHOST='';
7 %LET _CLIENTPROJECTNAME='';
8 %LET _SASPROGRAMFILE='';
9 %LET _SASPROGRAMFILEHOST='';
10
11 ODS _ALL_ CLOSE;
12 OPTIONS DEV=PNG;
13 GOPTIONS XPIXELS=0 YPIXELS=0;
14 FILENAME EGSR TEMP;
15 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
16 STYLE=HTMLBlue
17 STYLESHEET=(URL="file:///D:/aplicativos/SASHome/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css")
18 NOGTITLE
19 NOGFOOTNOTE
20 GPATH=&sasworklocation
21 ENCODING=UTF8
22 options(rolap="on")
23 ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24
25 GOPTIONS ACCESSIBLE;
26 proc contents data='D:\Projetos\SAS_Oficial_Online\EPG1V2_EG\data\pg1v2_eg.sas';
ERROR: Extension for physical file name "D:\Projetos\SAS_Oficial_Online\EPG1V2_EG\data\pg1v2_eg.sas" does not correspond to a valid
member type.
27 run;

NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

NOTE: The SAS System stopped processing this step because of errors.
28
29 GOPTIONS NOACCESSIBLE;
30 %LET _CLIENTTASKLABEL=;
31 %LET _CLIENTPROCESSFLOWNAME=;
32 %LET _CLIENTPROJECTPATH=;
33 %LET _CLIENTPROJECTPATHHOST=;
34 %LET _CLIENTPROJECTNAME=;
35 %LET _SASPROGRAMFILE=;
36 %LET _SASPROGRAMFILEHOST=;
37
38 ;*';*";*/;quit;run;
39 ODS _ALL_ CLOSE;
40
41
42 QUIT; RUN;
43

1 ACCEPTED SOLUTION

Accepted Solutions
japelin
Rhodochrosite | Level 12

I think this will fit you want to do.

 

%include 'D:\Projetos\SAS_Oficial_Online\EPG1V2_EG\data\pg1v2_eg.sas';

View solution in original post

7 REPLIES 7
PaigeMiller
Diamond | Level 26

PROC CONTENTS works on SAS data sets.

 

26 proc contents data='D:\Projetos\SAS_Oficial_Online\EPG1V2_EG\data\pg1v2_eg.sas';
ERROR: Extension for physical file name "D:\Projetos\SAS_Oficial_Online\EPG1V2_EG\data\pg1v2_eg.sas" does not correspond to a valid
member type.

You have data= and then a SAS program, not a SAS data set.

 

What are you trying to do?

--
Paige Miller
fpedrozam
Calcite | Level 5
I want to import and do some analysis
PaigeMiller
Diamond | Level 26

@fpedrozam wrote:
I want to import and do some analysis

PROC CONTENTS does neither. Why are you using PROC CONTENTS? Import from where?

--
Paige Miller
fpedrozam
Calcite | Level 5
import the file with extension .sas
PaigeMiller
Diamond | Level 26

A file with extension .sas is a SAS program, it has code that you (or someone) has written. It cannot be Imported because it does not have data. You cannot do analysis on it, because it is not data.

 

In just about all versions of SAS that I know of, you use File->Open to open this file.

 

 

--
Paige Miller
japelin
Rhodochrosite | Level 12

I think this will fit you want to do.

 

%include 'D:\Projetos\SAS_Oficial_Online\EPG1V2_EG\data\pg1v2_eg.sas';
fpedrozam
Calcite | Level 5
wonderful. It worked. thanks

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 2125 views
  • 1 like
  • 3 in conversation