I am trying to create an output record in data1 for every input record in file1. Each output record would contain all input record variables and I would have to maintain the format and contents of all variables (i.e. right/left justified, embedded spaces etc.). Is RIGHT option is correct to use in this case or it has to be incorporated with a PUT statement somehow? I guess my question is what would I do of those variables that are currently left justified to make them right justified and also for those variable with embedded spaces?
Note: layout is given for this file. Some variables are right and some are left justified. Some also have embedded spaces.
Note: This output SAS dataset file contains the same data as the input file1. All fields are character.
input var1 $ 1-19
var2 $ 20-34
var3 $ 35-53
var4 $ 54-68
var5 $ 69-93
var6 $ 94-98
var7 $ 99-103
var8 $ 104-105;
var5=right(var5); /* justifying var5 variable to the right */
var8=right(var8); /* justifying var8 variable to the right */