Programming the statistical procedures from SAS

Problem with proc statxact for SAS, with ods pdf/rtf

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 19
Accepted Solution

Problem with proc statxact for SAS, with ods pdf/rtf

Hello,

 

We are developing an application with SAS 9.4 version, in this application we use the statxact procedures for SAS , which is provided by CYTEL Company

We have an issue when we use these statxact procedures.

The problem is when we use the Statxact within an ODS pdf ODS  RTF ( to produce an pdf or rtf output ) , in fact the output in not redirected in the pdf / rtf output files, but the result of the procedure is redirected in listing output

Do you have a solution or a workaround for this issue

 

The example above illustrate our problem

 

data statxact(drop=i);
     do i=0 to 199;
           __strat='TEST';
           __col=int(i/100);
           __row=1;
 
           if mod(i,5) in (0 1 2) then
                __row=2;
           output;
     end;
run;
/* Here you add the folder path of the output */
ods pdf file="test.pdf";
 
title1 j=l "my_title_app1 ";
 
proc stratify data=statxact;
     odds /ex;
     col __col;
     row __row;
     stratum __strat;
run;
 
proc binomial data=statxact;
     odds /ex;
     popl __row;
     outcome __col;
run;
 
footnote1 j=l "my_footnote1";
ods pdf close;
title;
footnote;

 

Thank you for your help


Accepted Solutions
Solution
‎04-18-2016 04:02 AM
Occasional Contributor
Posts: 19

Re: Problem with proc statxact for SAS, with ods pdf/rtf

finally I redirect the output of statxact to an .lst file using ods listing, then I get the content of the file in a dataset, and using proc report within an ods rtf/pdf , i show the dataset 

View solution in original post


All Replies
Super User
Super User
Posts: 7,565

Re: Problem with proc statxact for SAS, with ods pdf/rtf

I would imagine you would need to take it up with this Cytel company, if it is there product only those associated with the product will know how their code interacts with SAS ODS system.  I can nly help with the SAS product, not third party products.

SAS Super FREQ
Posts: 3,547

Re: Problem with proc statxact for SAS, with ods pdf/rtf

Do the procedures support writing results to a SAS data set? If so, you can create an output data set and then use PROC PRINT to get the table to display in PDF or RTF destinations.

Occasional Contributor
Posts: 19

Re: Problem with proc statxact for SAS, with ods pdf/rtf

thank you for your response, 

 

I did a test, adding the out option = <dataset name>, we can redirect the output into a dataset, and after that use proc print or report to show the résult in an ods  but it's not the same presentation of result 

 

best regard 

Solution
‎04-18-2016 04:02 AM
Occasional Contributor
Posts: 19

Re: Problem with proc statxact for SAS, with ods pdf/rtf

finally I redirect the output of statxact to an .lst file using ods listing, then I get the content of the file in a dataset, and using proc report within an ods rtf/pdf , i show the dataset 

Super User
Super User
Posts: 7,565

Re: Problem with proc statxact for SAS, with ods pdf/rtf

[ Edited ]

Whilst I am glad you have found a solution, I would question the benefits of it.  To my mind relying on code from a third party vendor that you don't really know what it is doing, or how it works, and then developing a process of working around it doesn't seem optimal?  Personally I would go back to the provider and ask them how it is working, and why it does not function inline with SAS standards - i.e. to be able to create objects/datasets/output directly from the code.  If you rely on an output file - which could change each run, then your just opening a lot of problems for yourself.

 

On your other point:

" I did a test, adding the out option = <dataset name>, we can redirect the output into a dataset, and after that use proc print or report to show the résult in an ods  but it's not the same presentation of result "

 

The presentation of results is down to the indivisual and company.  It is very unlikely that any report ever made is exactly the way someone wants it, so manipulation of the output dataset should be considered to be your task anyways - I mean surely you want to change something in the output?

☑ This topic is solved.

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

Discussion stats
  • 5 replies
  • 593 views
  • 0 likes
  • 3 in conversation