Write and run SAS programs in your web browser

dmid command failed to work in SAS Studio

Accepted Solution Solved
Reply
Highlighted
Frequent Contributor
Posts: 112
Accepted Solution

dmid command failed to work in SAS Studio

Hello everyone,

 

The code is as below, it was what our instructor gave us to practice.

I wonder if anyone can give me some tips on how to get rid of the error messages. Thanks!

%let dirdata=/folders/myfolders/;
libname perm "&dirdata";
PROC FORMAT;
	value cut 
     1 = "Fair"       2 = "Good" 
     3 = "Very Good"  4 = "Premium"    5 = "Ideal";
	value color 
     1 = "D"   2 = "E"  3 = "F"  4 = "G" 
     5 = "H"   6 = "I"  7 = "J" ;
	value clarity 
     1 = "I1"   2 = "SI2"   3 = "SI1"   4 = "VS2" 
     5 = "VS1"  6 = "VVS2"  7 = "VVS1"  8 = "IF" ;
run;


title 'dmid';
proc print data=perm.dmid (obs=5);run;
proc contents data=perm.dmid;run;

title 'dmid_formats';
proc print data=perm.dmid_formats (obs=5);run;
proc contents data=perm.dmid_formats;run;
title;
1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         %let dirdata=/folders/myfolders/;
 74         libname perm "&dirdata";
 NOTE: Libref PERM was successfully assigned as follows: 
       Engine:        V9 
       Physical Name: /folders/myfolders
 75         PROC FORMAT;
 76         
 76       !  value cut
 77              1 = "Fair"       2 = "Good"
 78              3 = "Very Good"  4 = "Premium"    5 = "Ideal";
 NOTE: Format CUT is already on the library WORK.FORMATS.
 NOTE: Format CUT has been output.
 79         
 79       !  value color
 80              1 = "D"   2 = "E"  3 = "F"  4 = "G"
 81              5 = "H"   6 = "I"  7 = "J" ;
 NOTE: Format COLOR is already on the library WORK.FORMATS.
 NOTE: Format COLOR has been output.
 82         
 82       !  value clarity
 83              1 = "I1"   2 = "SI2"   3 = "SI1"   4 = "VS2"
 84              5 = "VS1"  6 = "VVS2"  7 = "VVS1"  8 = "IF" ;
 NOTE: Format CLARITY is already on the library WORK.FORMATS.
 NOTE: Format CLARITY has been output.
 85         run;
 
 NOTE: PROCEDURE FORMAT used (Total process time):
       real time           0.00 seconds
       cpu time            0.02 seconds
       
 
 86         
 87         /* Both dmid.sas7bdat and dmid_formats.sas7bdat are files
 88           that correspond to permanent SAS data sets. Those are the SAS data sets
 89            we'll be using this week.*/
 90         
 91         /* These are the dmid SAS data sets. Note that
 92         dmid uses cut/color/clarity as character variables,
 93         while dmin_formats uses these as numeric, formatted
 94         variables. */
 95         
 96         title 'dmid';
 97         proc print data=perm.dmid (obs=5);run;
 ERROR: File PERM.DMID.DATA does not exist.
 
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 
 98         proc contents data=perm.dmid;run;
 ERROR: File PERM.DMID.DATA does not exist.
 
 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.
 99         
 100        title 'dmid_formats';
 
 
 101        proc print data=perm.dmid_formats (obs=5);run;
 ERROR: File PERM.DMID_FORMATS.DATA does not exist.
 
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 
 102        proc contents data=perm.dmid_formats;run;
 ERROR: File PERM.DMID_FORMATS.DATA does not exist.
 
 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.
 103        title;
 104        
 105        
 106        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 119        

Accepted Solutions
Solution
‎03-08-2018 08:04 AM
Valued Guide
Posts: 563

Re: dmid command failed to work in SAS Studio

Check the folder you used in the libname-statement: the message says that the  dataset dmid and dmid_formats are not in that folder.

View solution in original post


All Replies
Solution
‎03-08-2018 08:04 AM
Valued Guide
Posts: 563

Re: dmid command failed to work in SAS Studio

Check the folder you used in the libname-statement: the message says that the  dataset dmid and dmid_formats are not in that folder.

Frequent Contributor
Posts: 112

Re: dmid command failed to work in SAS Studio

Posted in reply to andreas_lds

Thank you!

 

I created a dirdata under "myfolders"

and it seemed work! 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 127 views
  • 0 likes
  • 2 in conversation