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
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!
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.
Ready to level-up your skills? Choose your own adventure.