BookmarkSubscribeRSS Feed
Babloo
Rhodochrosite | Level 12

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;
5 REPLIES 5
Ksharp
Super User

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
Rhodochrosite | Level 12
If I change the dataset name from Work to Employee, will it create a
Employee dataset in the library as you mentioned below?


ballardw
Super User

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

Babloo
Rhodochrosite | Level 12
Whether I have to use the select statement after writing the Proc format?
Appreciate if you could help me with the code snippet.
Ksharp
Super User

Table EMPLOYEE will still be in WORK library .

proc format just update original format by table EMPLOYEE.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 5 replies
  • 651 views
  • 3 likes
  • 3 in conversation