I am currently working with a dataset that looks somewhat like this, albeit with around 210 variables and 25031 rows in total. DATA PUBLIC.BCUSTOMERS; INPUT CUSTNO $ B1STAT JOB_ID; CARDS; C19291203 002103 0010 C19291204 000091 0001 C19291205 000000 0101 ; RUN; As I have lost the original CSV file for this table I decided to export this dataset as a CSV file for backup purposes, but whenever I do this, columns such as "B1STAT" and "JOB_ID" that have 0s in their first digits tend to be exported with a few digits missing (e.g.B1STAT and JOB_ID for CUSTNO C19291204 is exported as 91 and 1). My original idea was to first convert such variables to character variables and add a random letter to the front of the row using CATX() (e.g.B1STAT and JOB_ID for CUSTNO C19291204 would become A000091 and B0001) and export the data like that, after which I would use SUBSTR() to delete the letter from the column. Problem is, there's at least 60 + variables like this and repeating the process for all such variables manually seems rather cumbersome, and I am still unfamiliar with macros at the moment. Is there a way to ensure that the table is exported correctly in a simpler manner instead of doing what I described above?
... View more