BookmarkSubscribeRSS Feed
rking
Calcite | Level 5
I changed the format on an column in Management Console from none to 14. in an Oracle table in the metadata respository. When I look at the data in EG the format used is 12.. After importing the data into metadata respository I thought I could assign formats so that all users can see the data in the best format. Is there an additional step that I have to do?

rking
8 REPLIES 8
deleted_user
Not applicable
When printed, is the numeric value a 12 part number? Or are you seeing the number converted to scientific notation or truncated?

If I use a 14. format on 123,456,789. then it will appear as I typed it, which is a 12 position format. This is correct behaviour, not a problem.

Kind regards

David
rking
Calcite | Level 5
The number is a 14 digit number that is being displayed in scientific notation.

rking
deleted_user
Not applicable
Displayed in what? If it is a reporting procedure, then try to assign the format manually to the step code to verify there is enough screen real estate to display the number as requested.

If it is a table viewer, then I seem to recall the ViewTable object is still limited to around 8 places in its numeric format display.

Kind regards

David
deleted_user
Not applicable
This is confusing.

At first you said the number was being displayed as 12. but now you are saying it is 14 characters of scientific notation. Which is it?

If you define the format to be 14. and the is only 10000, then that is what you will see, and depending on the output media (html, line printer, etc.) you may not see the leading spacing to make it 14 characters wide.

if you define the format to be 6. and the number is 123456789 SAS will print/display it as 1.23E8

[pre]
data dummy;
format dummy 6.;
dummy = 1; output;
dummy = 12; output;
dummy = 123; output;
dummy = 1234; output;
dummy = 12345; output;
dummy = 123456; output;
dummy = 1234567; output;
dummy = 12345678; output;
dummy = 123456789; output;
run;
quit;

proc print;
run;
quit;

1 1
2 12
3 123
4 1234
5 12345
6 123456
7 1.23E6
8 1.23E7
9 1.23E8

[/pre]
rking
Calcite | Level 5
Let me clarify. I have a numeric column named batch_load_timestamp in a oracle table that is always 14 digits long. In Management Console in the metadata respository the format was blank by default so I changed it to "14.". When I open the dataset from the server list in EG the column is displayed in scientific notation. The properites window show the format as "BEST12.0". EG appears to ignore the change I made in Management Console. I can user the query builder in EG and change the format to 14. and it displays correctly in the resulting dataset.

rking
deleted_user
Not applicable
Ah, the mysteries of the MetaData server. It is constantly challenging my perception of reality as well. I think SAS over complicated itself into a royal mess with that thing. In my ignorant opinion, I believe some developers (technician minds) went wild without proper engineering design control.
ChrisHemedinger
Community Manager
Changing the format in metadata may not be enough. If EG is opening the data using the META engine (which sees things through the filter of metadata), then your format would be applied. However, if this is a preassigned library that EG is reading with the native library engine (ORACLE), then the database attributes of the "live" data are used -- the metadata attributes don't affect it.

Chris
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
rking
Calcite | Level 5
When I removed preassigning the library, the format was applied correctly. Thanks for the help!

rking

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 8 replies
  • 664 views
  • 0 likes
  • 3 in conversation