BookmarkSubscribeRSS Feed
brophymj
Quartz | Level 8

can you call format/informat tables from a proc sgplot procedure?

The below code (calling the format table) works perfectly in a datastep but I get the following error when running it in a proc sgplot procedure.

"Format/Informat nolevels. could not be located."

proc sgplot data=Egidwh_oneway4 ( where=(input(put(factor,nolevels.),4.) <= 10 and factor = "cover"));

   title "cover";

   vbar level / response=exposure;

   vline level / response=all_LR y2axis;

run;

2 REPLIES 2
djrisks
Barite | Level 11

Hello,

My gut feeling is that you should be able to filter on formats within SGPLOT, because you can plot formats in SGPLOT. Can you please confirm if you have exposure data and all_LR data for that where clause?

It would also be helpful to have access to the egidwh_oneway4 dataset.

In any event, I'm sure that you worked out that you can perform the where clause with a datastep, and then use SGPLOT on the transformed dataset.

Thanks.

ballardw
Super User

In which library does your format NOLEVELS exist? If it resides in a permanent library then likely the library is not in the current FMTSEARCH path. Or if the format is being created in the work library then it does not persist from SAS session to session and the code needs to be rerun.

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!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 872 views
  • 0 likes
  • 3 in conversation