BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I know that this was okay in 9.13 of SAS base previously (CC=0), and now gets a warning message with a CC=4 now, and I'm okay with that, but I would like to have the warning removed and go back to a CC=0 to have things cleaned up.

What do I have to do to make this happen?

code is as follows:
199 + IF _N_ = 1 THEN DO N=1 TO &NUMGRPS;
200 + GRPN{N}=PUT(N,$GNAME.);
WARNING: Variable N has already been defined as numeric.
201 + END;

Help appreciated.
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
A related PROBLEM NOTE on SAS.COM support website (I used SEARCH to find it). You are using a numeric SAS variable "N" against a character SAS format, which is causing the WARNING message condition.

Suggest you make a code tightening correction (my words) and use a PUT function against the "N" NUMERIC type variable with consideration for the length of &NUMGRPS, as shown below:

PUT(N,5. -L )

Problem Note 35428: Warning messages that incorrectly produce a RC=0 now correctly produce a RC=4 in SAS 9.2
http://support.sas.com/kb/35/428.html
deleted_user
Not applicable
Thanks SBB.

I had found the error list that you pointed out.

The resolution was as easy as you stated. I used the format without the dollar sign in front of the format error.

Thanks again

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 6723 views
  • 0 likes
  • 2 in conversation