thanks all. Actually I got the reason. if we store the results in a variable a and apply any appending special character causing the same output. If we assign the values to a variable results to write in data set and filling back the length by 8 characters hence same output. And if apply appending a special character before storing to any variable (writing back to data set) results the different out put. For above explanation, data temp; x="ab_cd "; y="$"||trim(left(x))||"$"; z="$"||left(trim(x))||"$"; v="$"||strip(x)||"$"; w=cats("$",x,"$"); put y=; put z=; put v; put w; run; y=$ab_cd$ z=$ab_cd $ $ab_cd$ $ab_cd$ Devi...
... View more