when I convert sas dataset to csv one file looks like this
2.0223322E12
how can I transform its format before converting to csv so that it looks like a normal decimal?
sorry I need look like a 14 digit no not a decimal
eg 12345678901234
What method are you using for the export?
If you specify a format with an explicit length for that variable it might help, e.g., "14."
@HeatherNewton wrote:
when I convert sas dataset to csv one file looks like this
2.0223322E12
how can I transform its format before converting to csv so that it looks like a normal decimal?
You don't say where you are looking at this. If, as I suspect, you are examining the CSV file with spreadsheet software try making the column width wider. One common behavior is to attempt to display something that consists of many digits in the allowed space. So the software displays the value as scientific notation.
Or open the CSV in a TEXT editor to confirm the value was not exported by SAS as exponential. At which point make sure that the format SAS has for the variable will display properly. If your values actually have more than 14 digits you likely need to consider if it should be numeric at all as you bumping up against the storage precision of numeric values.
Which raises question, exactly what does the value represent? If you are not doing arithmetic with it, like an account number or other identifier, then it should be stored as character.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: