ods rtf file in SAS Studio.

569 views
Skip to first unread message

Sarika

unread,
Oct 13, 2014, 9:09:09 AM10/13/14
to anova...@googlegroups.com






Hello Vikas,

I am going through class of Oct 4 th 2014 and trying out below code to create ods rtf file . I have tried so many diff ways to create ods rtf file but not successful. Need help to create ods rtf file  and help me understand what is wrong with below code .This is the exact code you used to create rtf file  in class.


data temp;
    length temp1 $200;
    temp1="parameter";output;
    temp1="^\li240 Visit";output;
    temp1="^\li360 Statistics";output;
run;

ods escapechar="^";
ods rtf file="C:\Users\Sarika\Dropbox\batch5\homework\SarikaM\temp.rtf";
proc report data=temp nowd headline headskip;
run;
ods rtf close;


I am getting these errors.

51 ods escapechar="^";
52 ods rtf file="C:\Users\Sarika\Dropbox\batch5\homework\SarikaM\temp.rtf";
ERROR: Insufficient authorization to access
/opt/sasinside/SASConfig/Lev1/SASApp/C:\Users\Sarika\Dropbox\batch5\homework\SarikaM\temp.rtf.
ERROR: Fatal ODS error has occurred. Unable to continue processing this output destination.
WARNING: No body file. RTF output will not be created.
53 proc report data=temp nowd headline headskip;
54 run;
ERROR: The width of temp1 is not between 1 and 132. Adjust the column width or line size.
NOTE: This affects LISTING output.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 3 observations read from the data set WORK.TEMP.
NOTE: PROCEDURE REPORT used (Total process time):

Jennifer SUN

unread,
Oct 13, 2014, 12:17:03 PM10/13/14
to anova...@googlegroups.com
HI Sarika,

Could you try to directly output your file under your home folder in SAS studio?

Jennifer

Nisarg

unread,
Oct 13, 2014, 6:57:30 PM10/13/14
to anova...@googlegroups.com
 Hi Sarika, 
There are two different errors in code 
1. ODS output  & 
2. temp1 width / size .
Solution 1 : 
You have to change the ods rtf file="C:\Users\Sarika\Dropbox\batch5\homework\SarikaM\temp.rtf";  
to either Windows OR Linux . 
I mean Windows will use C:\mycomputer\...\...\... 
        AND Linux is using   /example/.../.../...  in your example both are mixed together thats the reason for errors . 
In this case you can change the  ods statment to ods rtf file = "/folders/myshortcuts/batch5/homework/SarikaM/temp.rtf" ;  OUTPUT will be in dropbox folder
                                                OR  ods rtf file = "/folders/myshortcuts/myfolder/ecourse/temp.rtf";  OUTPUT will be in C:\SASUniversityFolder\myfolder\ecoure

Solution 2 :
You have to check code again and check the properties of TEMP1 variable . 



Regards 
Nisarg 
(Batch4)

Sarika

unread,
Oct 14, 2014, 9:25:30 AM10/14/14
to anova...@googlegroups.com
Hello Nisarg,

Thank you very much for helping me out .I really appreciate.I am able to create rtf file in batch5,homework folder in SAS studio .

I still didn't figure out code ,if I want to save it in my local C: drive. I am using windows7.

code I used is.

data temp2;
   length temp1 $132;
    temp1="parameter";output;
    temp1="^\li240 Visit";output;
    temp1="^\li360 Statistics";output;
run;

ods escapechar="^";
ods rtf file="C:\temp2.rtf";
proc report data=temp2 nowd headline headskip;
run;
ods rtf close;

Nisarg

unread,
Oct 15, 2014, 4:55:19 PM10/15/14
to anova...@googlegroups.com
Hi Sarika, 
I dont understand your issue. 
If you are using the second ODS stat (the one I mentioned earlier) than your output will be in that particular folder .
 But if you want output directly in C:\ ... than you have to change you SAS studio setup folders or you can map one more folder to sas Studio. 
 
You can create ODS output in C:\... or anywhere you want if you are using SAS.But in SAS studio you have to go by the mapped folders ..
I think this might clear you doubt.

Regards 
Nisarg

Sarika

unread,
Oct 16, 2014, 10:48:10 AM10/16/14
to anova...@googlegroups.com
Hello Nisarg,

I am able to create ods rtf file under batch 5 , under myfolders basically anywhere in SAS studio.

I want to create ods output in C: giving direct path of C: in ods rtf file path statement ,which I am not able to.
what do you mean by " change  SAS studio setup folders or you can map one more folder to sas Studio "  to create ods file in C:? 

Thank you.

Sarika.. 

Nisarg

unread,
Oct 16, 2014, 7:13:19 PM10/16/14
to anova...@googlegroups.com
Hi Sarika 

I mean the SAS studio is mapped like that , as per my understanding you will get errors if you give direct path in SAS studio.
So its good idea to stick to the output we are getting for now. 
I bet you can Output in C:\ directly OR anywhere you like when you are at real job on SAS.

I cant see the correct code after adding the  ods output path.
Did you changed the code ? There were still errors in the code after the ods path is corrected. 
Have you figured that out ?

Regards 
Nisarg 

 

Anova Groups

unread,
Oct 17, 2014, 2:19:29 AM10/17/14
to anova...@googlegroups.com
SAS studio is residing on virtual machine (VM) within your real machine. VM has access to only the transient folder (TF) and machine folder (MF), it does not have access to c:\ drive, unless you map your C drive directly to either TF or MF.
Reply all
Reply to author
Forward
0 new messages