BookmarkSubscribeRSS Feed
raghidazamzam
Calcite | Level 5

 

In reference to Usage Note 22565,

http://support.sas.com/kb/22/565.html

 

I am trying to run multiple pairwise comparisons using Proc Multtest procedure. So I used 

ods output chisq(persist)=chisq(where=(statistic="Chi-Square")
                                      rename=(Prob=Raw_P));

before the multiple tests to save them in chisq. However , I got a message saying 

ERROR: You cannot open WORK.CHISQ.DATA for output access with member-level control because WORK.CHISQ.DATA is in use by you in resource environment __ODS_DS.
 
I followed the step as is. Can you please let me where went wrong!
 
Thank you,
Raghida
 

 

4 REPLIES 4
Reeza
Super User
You ran it once, have the table open so can't run it again. Or you have a different table with the same name open. You can replace it while it's open.
raghidazamzam
Calcite | Level 5

Thank you for your reply! Can you please explain more what table is opened or how to close the table.

FreelanceReinh
Jade | Level 19

Hi @raghidazamzam,

 

The PERSIST (or PERSIST=PROC) option of the ODS OUTPUT statement keeps the output dataset (here: CHISQ) open in order to allow each of the six PROC FREQ steps to contribute one observation to it. (Obviously, it's more convenient to end up with one dataset with six obs. than to have six datasets with one obs. each.) Once you submit

ods output clear;

(as suggested in the usage note), the dataset is closed so that you can work with it. This is indicated by the log message 

NOTE: The data set WORK.CHISQ has 6 observations and 7 variables.

Alternatively, you can close the OUTPUT destination with 

ods output close;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1276 views
  • 2 likes
  • 3 in conversation