And help with guidance, I will try....here we go/continue....
You will need to consider the following additional points with your SAS program:
1) each SAS NUMERIC type variable has some type of output format, either explicit or SAS-default BEST. (observed from a SAS PROC CONTENTS listing, say using SASHELP.CLASS as a starter file to work with) -- and, so, a decision must be made (by the OP) whether or not to use the output format when generating the SAS CHARACTER variable interpretation (sounds like a YES, based on #2 and #3 below).
2) where decimal notation is found, it is to be removed, thus shortening some field lengths - observation being made here.
3) where leading or trailing zeros are present in the SAS database (not the external file by the way), apparently these are to be preserved, meaning there must be an output format used, because BEST. doesn't generate this behavior, such as Zw.d and others.
4) the incoming SAS variables of numeric type can be associated with an ARRAY for simplified DO/END loop processing -- need to learn about arrays.
5) the DATA step function VNAME can be used to extract the true SAS variable name for handling within the DO/END loop while using the ARRAY - need to look-up VNAME.
6) the DATA step function VFORMAT can be used to extract the true SAS output format name for handling within the DO/END loop while using the ARRAY - need to look-up VFORMAT.
7) the PUTN function can be used (along with info from #5 and #6 above) to generate a SAS CHARACTER variable (even as part of an array within the DO/END loop processing) - need to look-up PUTN.
8) the COMPRESS function can be used (along with the PUTN and related info) to manipulate the SAS CHARACTER variable in #7 above (as part of the array within the DO/END loop processing) - need to look-up COMPRESS.
9) after creating equivalent SAS CHARACTER variables for the SAS NUMERIC variables, another DO/END loop can be used with the PUT statement (to an external file) to output the data-record, one for each corresponding SAS observation.
Now, take each of the points for consideration and work on them one-at-a-time, as you build up your SAS program and learn about the DATA step processing, functions, and SAS variable value manipulation. As often as needed, come back to the forum with challenges/concerns, as your SAS program evolves. Frankly, you've chosen a medium- to advanced-level DATA step challenge, where there is input/output data manipulation and conversion involved --- a keen learning opportunity, I'd say.
You've got the SAS support
http://support.sas.com/ website with SAS-hosted DOC and supplemental technical and conference reference material available for access, either using the website SEARCH facility or with crafting a Google advanced search argument (use the site:sas.com to limit the search).
Good luck!
Scott Barry
SBBWorks, Inc.