NebulousReveal
NebulousReveal

Reputation: 572

Permanent Data Sets

If you create a permanent data set, will the formats and labels not transfer over? When I use PROC PRINT, all the labels and formats are applied correctly. But when I open up the actual data set I created, none of the labels and formats are applied. I also stored my formats into a catalog using PROC FORMAT LIBRARY and OPTIONS FMTSEARCH. So it should work because the formats are also permanent.

Upvotes: 1

Views: 309

Answers (3)

Robert Penridge
Robert Penridge

Reputation: 8513

Are your formats user-defined? If so you need to follow the below instructions to enable them in SAS Universal Viewer:

You can apply SAS formats to or remove SAS formats from columns in the data set you are viewing. Right-click to select a cell in the column for which you want to change the format. In the menu that appears, check or uncheck Format. The Format option acts like a toggle. In the window, you can supply user-defined formats. These formats need to be created in SAS, exported to an XML formats file, and then imported to SAS Universal Viewer where they can be used to format values.

(Taken from http://support.sas.com/documentation/cdl/en/univiewerug/63357/PDF/default/univiewerug.pdf)

Upvotes: 1

NebulousReveal
NebulousReveal

Reputation: 572

I figured it out. I had to use the PUT statement instead of the format statement. Also had to use libname.data instead of just data for saving formats for new data sets.

Upvotes: 0

Jay Corbett
Jay Corbett

Reputation: 28391

Execute a Proc Contents or Datasets on your data set to determine formats, labels (and other attributes).

Proc Contents data=yourlib.yourdata;
run;

Proc datasets library=yourlib;
 Contents data=yourdata details varnum memtype=data;
run;
quit;

It is helpful if you post your code.

Upvotes: 0

Related Questions