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

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

1 ACCEPTED SOLUTION

Accepted Solutions
reznac
Obsidian | Level 7

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

5 REPLIES 5
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

Rick_SAS
SAS Super FREQ

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.

reznac
Obsidian | Level 7

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 

reznac
Obsidian | Level 7

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 

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

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