In addition, PROC CONTENTS expects a 2 level name either to a specific SAS dataset or the use of _ALL_ to indicate you want to see all the datasets in a SAS library.:
proc contents data=work.mydata; /* specific dataset */
proc contents data=work._all_; /* ALL work datasets */
proc contents data=sashelp.class; /* specific dataset */
proc contents data=sashelp._all_; /* ALL SASHELP datasets */
So it looks to me like you potentially have one or two possible issues.
I created a folder 'OP' in and mentioned that folder name with .log extention in my code.This time i did not get any errors,but when i checked the folder to see the .log file,I did no see anything.Please advise.
Now, if you did something like this PROC OPTIONS:
PROC PRINTTO LOG='c:\temp\options.log' NEW;
PROC PRINTTO PRINT=PRINT LOG=LOG ;
THEN, there'd be something to see in the PROC PRINTTO copy of the log(partial results):
NOTE: PROCEDURE PRINTTO used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
241 proc options;
SAS (r) Proprietary Software Release 9.2 TS2M2
APPEND= Append at the end of the option value
Location of Java applets
ARMAGENT= ARM Agent to use to collect ARM records
ARMLOC=ARMLOG.LOG Identify location where ARM records are to be written
Enable/Disable ARMing of SAS subsystems
NOASYNCHIO Do not enable asynchronous input/output
AUTOSAVELOC= Identifies the location where program editor contents are auto saved
NOAUTOSIGNON SAS/CONNECT remote submit will not automatically attempt to SIGNON
BINDING=DEFAULT Controls the binding edge for duplexed output
BOMFILE Add Byte Order Mark when creating Unicode files
Bottom margin for printed output
BUFNO=1 Number of buffers for each SAS data set
BUFSIZE=0 Size of buffer for page of SAS data set
If you are saying that you run the code and that the op.log file is NOT created, at all, then you have a question for Tech Support.
The reply below from the OP is a bit concerning and possibly a confusion point:
"I created a folder 'OP' in and mentioned that folder name with .log extention in my code"
Based on the SAS code piece communicated in a prior reply - I would expect to see the file op.log in the directory User20 with "S:\DEV\" directory structure -- not in a sub-folder "op" under User20, if that is what was created. Here is the code I saw:
PROC PRINTTO LOG='S:\DEV\User20\op.log' NEW;RUN;
The information from prior posts is contradictory - possibly after doing some additional desk-checking, then post the exact SAS log where it is executed, rather than just pasting your code.
"I would expect to see the file op.log in the directory User20 with "S:\DEV\" directory structure " -
To save a log ,do I have to create/save an empty log,so that the PRINTTO prints the log to that log file?