I have two text files t1 and t2 and t6 and the output should be t3 and t4 and t7 (sas datasets) respectively . While importing i have to import in such a way that when the first coulmn has numberic data (1,2,10) i want that to be imported as numeric column (Memid) else when first column has character data and i want it to be character column (numV)
Are T3 and T4 ever going to be combined for analysis? If so then you really do not want to change the variable types for var1 as it seems you are thinking of with your Memid and NumV variables. Typically any sort of identification variable is not subject to arithmetic (Question: what does the result actuall mean when you add credit card account numbers for example?) So you could likely simplify your process by providing a single identification variable. You might want to have a variable that indicates what type of origination file that is important.
Since your T6 file actually has a different structure - the PIN variable- you need to provide some way to indicate that when reading that file format. Easiest might be file format variable and test that value to use the correct input statement.
I am somewhat confused about reading what your example data shows as likely money values (price, credit price, debit price) that you seem to be reading as character (var2 $ var3$) and not actually using what appear to be your desired variable names xy, Credit, Debit yy, other, all and nhhh.