In a DATA step program, you can create new variables with an assignment statement:
length New_Columns $2;
....either SET or INFILE/INPUT statements to read data....
...logic to figure out value of new variable ...
New_Columns = 'A8';
What I don't understand is your statement In my caluculation I got results as 8 then I should display a8(columns name) in new columns as below.
What calculations? The above approach will create a 2 character text variable whose value is always the string 'A8'. However, this might be the wrong approach depending on what you mean by "calculation". Also, you don't show any code or log file for what you've already tried....that might help folks visualize your logic or attempt. Is it possible to return 2 or more values from your calculations??? If so, what would happen?? Could different observations have different values calculated????
Also, an ARRAY may work for your needs, along with VNAME/VNAMEX, if you want concise code paragraph and the ability to detect what variable (name) has a particular value-condition. The ARRAY can declare a list of SAS variables or possibly _NUMERIC_ ...or... _CHARACTER_ to mean all SAS variables of a given type.
Yes, and it's time to crack open the DOC, with focus on the SAS Language Elements guide and the functions. Check the SAS support http://support.sas.com/ website and use its SEARCH facility in addition to the SAS forum archives and SAS system documentation.