I'm trying to update the dataset where the below fmtname has stored. I don't know which dataset (I know the library though)has the format definition. when I execute the below code, it has 0 observations.
proc sql;
create table myfmts as
select fmtname,libname, memname
from dictionary.formats
where fmtname in ('$VA_MAKPRD' '$VA_LEADACTIE_SUBGRP')
;
quit;
When I execute the below code, I could see the dataset which I need to update. But 'formats' is not the actual dataset which I need to update. It is just a temporary dataset which I used to see the dataset. Appreciate if someone of you guide me to see the actaul dataset which I need to update.
proc format library=it_rci_s.formats cntlout=work;
run;
You already have FORMAT information in table WORK.
modify table WORK. and update FORMAT by
proc format library=it_rci_s cntlin=work;
run;
@Babloo wrote:
If I change the dataset name from Work to Employee, will it create a
Employee dataset in the library as you mentioned below?
If you are referring to proc format the data set name on the CNTLOUT option is created then the name you supply follows normal SAS rules. If you want the cntlout in that library you have to use cntlout=library.employee, otherwise it will write to WORK or USER.
Since cntlout will write the information about all formats in the catalog to cntlout by default you might be wanting to add a SELECT statement to only include specific format(s) to the output.
Table EMPLOYEE will still be in WORK library .
proc format just update original format by table EMPLOYEE.
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.