BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I was trying to add a new variable to my dataset and wanted it to be formatted using the format i define. But I always get this error "The format $ was not found or could not be loaded."

Can someone help me please.

Here's a sample of my code:

proc format library=fmt.coll;
value $brcode '036' = 'Manila'
...
OTHER = 'Other'
;

value buc 0 = 'buc0'
...
120 - High = 'buc12'
;
run;


Here' s how I use my format.

data mydata.new;
set temp;
format brname $brcode.;
bkt = put(numdays,buc.);
run;


I only encounter the error with this line "format brname $brcode.;"
Is there any other way to do it?

I also tried brcode = put(brname,$brcode.); but still the same problem
"The format $brcode was not found or could not be loaded."

Thank you guys, hoping for your help and suggestions.
1 REPLY 1
deleted_user
Not applicable
hi guys,

i found the answer to my problem

options fmtsearch=(formats.collection);

thanks

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 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.

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
  • 1 reply
  • 1041 views
  • 0 likes
  • 1 in conversation