PROC Export

Posted on 2005-05-05
Last Modified: 2011-10-03
I use SAS Version 9.1 and am interested in PROC Export.  What I want to do is output numbers to tables in an MS Access database without losing the end zeroes, e.g. 9.20 stays 9.20 and doesn't become 9.2 in the database.  If I just write

data DCB;
set allpay
if locality="DCB";
proc export data= DCB

The zeroes get lost.  Any way to keep them?  Thanks!
Question by:ratclijh
    LVL 6

    Accepted Solution


    You will have to make that field a text field.  It's pretty much an MS standard across their apps.  If a numeric field has any leading or trailing zeros then they are truncated.  The only work around is to save the field as text and then if you need to do calculations on it use a CONVERT or some equivelant function.


    Author Comment

    Yep, I ended up just using a put statement in SAS.  The values began life as numeric because they were calculated in my program but had to be text or the zeroes got dropped.

    Thanks again.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    A short article about problems I had with the new location API and permissions in Marshmallow
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now