BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
pmbrown
Quartz | Level 8

i develop my code in pc sas but ultimately run it on unix. I am running npar1way and using the ods KruskalWallisTest created. On unix the p-value is 'nvalue1' in this ods, in the former it's 'prob'. Is there an option i can add to my code so it won't use the newer variable name nvalue1, ie so the code i develop in pc sas works in unix in this scenario?

1 ACCEPTED SOLUTION

Accepted Solutions
pmbrown
Quartz | Level 8

i can confirm that 'tables=restore' solves it, i had to implement it like this:

ods output KruskalWallisTest=kwpval (where=(name1='P_KW'));
%if "&sysscpl" eq "X64_10PRO" %then %do;
proc npar1way data=... wilcoxon plots=none tables=restore;
%end;
%else %do;
proc npar1way data=... wilcoxon plots=none ;
%end;
  class ... ;
  var ...;
  by ...;
quit;

this produces the same result in pc sas and unix and and without errors

View solution in original post

10 REPLIES 10
PaigeMiller
Diamond | Level 26

I am skeptical that on one operating system something named 'prob' is replaced by something named 'nvalue' in another operating system. This doesn't make sense. If anything, it sounds like a bug, if it is as you describe.

 

Please show us the output data sets (screen capture is fine, use the "Insert Photos" icon, do NOT attach files) from both runs of PROC NPAR1WAY so we can see this for ourselves.

--
Paige Miller
pmbrown
Quartz | Level 8

i mean to say it's a version issue. At some point sas change this ods, although from a search online a can't find a sas note about this change, although maybe this is related: https://communities.sas.com/t5/Statistical-Procedures/ODS-OUTPUT-WilcoxonTest-for-PROC-NPAR1WAY-give...

i'll need to explore it more ... i have old macros using npar1way that no longer run because of this, so i've been aware of it for a while, but never looked into it until now, cheers

PaigeMiller
Diamond | Level 26

As I requested, please show us screen captures.

--
Paige Miller
ballardw
Super User

@pmbrown wrote:

i mean to say it's a version issue. At some point sas change this ods, although from a search online a can't find a sas note about this change, although maybe this is related: https://communities.sas.com/t5/Statistical-Procedures/ODS-OUTPUT-WilcoxonTest-for-PROC-NPAR1WAY-give...

i'll need to explore it more ... i have old macros using npar1way that no longer run because of this, so i've been aware of it for a while, but never looked into it until now, cheers


Each release for quite awhile SAS has provided summaries of what is new in the online help.

 

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_whatsnew_sect036.htm which is the documentation for SAS/Stat 15.1 in the What's New listing for NPAR1WAY

Tom
Super User Tom
Super User

The operating system is not the issue.

So something else has also changed.

What version of SAS are you using on both systems?  Make sure to check the maintenance release number.  You can look at the SYSVLONG macro variable.

What setting do you have for the VALIDVARNAME option?

Are the names of the variables using the analysis the same?

Is the rest of the code the same?

pmbrown
Quartz | Level 8

i can confirm that 'tables=restore' solves it, i had to implement it like this:

ods output KruskalWallisTest=kwpval (where=(name1='P_KW'));
%if "&sysscpl" eq "X64_10PRO" %then %do;
proc npar1way data=... wilcoxon plots=none tables=restore;
%end;
%else %do;
proc npar1way data=... wilcoxon plots=none ;
%end;
  class ... ;
  var ...;
  by ...;
quit;

this produces the same result in pc sas and unix and and without errors

Tom
Super User Tom
Super User

You are testing the wrong thing.  You are testing what type of operating system you are running on.  The change in behavior is based on the VERSION of SAS you are using, not the operating system it is running on.   Your code will fail when your SAS version is finally updated so that it also generates the new structure by default.  Test the value of SYSVLONG instead.

%let tables_restore=tables=restore;
%if "&sysvlong" < "9.04.01M6" %then %do;
  %let tables_restore=;
%end;

proc npar1way data=... wilcoxon plots=none &tables_restore;
  class ... ;
  var ...;
  by ...;
quit;
PaigeMiller
Diamond | Level 26

@pmbrown Please mark the reply from @Watts as the correct answer.

--
Paige Miller
pmbrown
Quartz | Level 8

no, it just repeats what i already said in my earlier post

Watts
SAS Employee

You can use the TABLES=RESTORE option in the PROC NPAR1WAY statement to display the score test tables in legacy, factoid (label-value) form. By default in newer releases, PROC NPAR1WAY displays these tables in tabular format. 

 

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 10 replies
  • 2152 views
  • 2 likes
  • 5 in conversation