In one of our program, they have called the user defined format as shown below. Program is working fine and they have not created the format in that program. But I could not locate where this format is created. Any help?
type = put(material, $mattype.); Category = put(type,$type.);
@David_Billa wrote:
@Kurt_Bremser Library Name - WORK and MEMBER NAME - FORMATS
Then the formats were created by code you ran in your current session. You need to work through all the codes you ran after starting your session.
Query DICTIONARY.FORMATS:
proc sql;
select libname, memname, path
from dictionary.formats
where fmtname in ('$MATTYPE','$TYPE')
;
quit;
@Kurt_Bremser It's blank in path name, no values.
@David_Billa wrote:
@Kurt_Bremser It's blank in path name, no values.
And what is in LIBNAME and MEMNAME?
@Kurt_Bremser Library Name - WORK and MEMBER NAME - FORMATS
@David_Billa wrote:
@Kurt_Bremser Library Name - WORK and MEMBER NAME - FORMATS
Then the formats were created by code you ran in your current session. You need to work through all the codes you ran after starting your session.
As Kurt said. use DICTIONARY, and get the path name by PATHNAME() .
proc format ; value fmt 1='asf'; run; proc sql; select * from dictionary.formats where source='C'; quit; %let path=%sysfunc(pathname(WORK)); %put &=path.;
For info, this macro will query the dictionary table and return details of the attributes of all the formats in a table (including path): https://core.sasjs.io/mp__getformats_8sas.html
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.