@novinosrin Thanks for your reply. I am using SAS Enterprise guide and got error see NOTE section below. 27 data have; 28 length a $1 b $3 ; 29 a = 'S' ; b ='XY' ; c = 1; 30 output; 31 a = 'S' ; b = 'X' ; c = 5 ; 32 output; 33 run; NOTE: The data set WORK.HAVE has 2 observations and 3 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 34 35 data want; 36 set have; 37 length _c $2 z $6; 38 _c=put(c,z2.); 39 z=peekc(addr(a),1)||peekc(addr(b),3)||peekc(addr(_c),2); 40 run; NOTE: ADDR function cannot be used on this platform. Use ADDRLONG instead. NOTE: PEEKC function cannot be used on this platform. Use PEEKCLONG instead. NOTE: There were 2 observations read from the data set WORK.HAVE. NOTE: The data set WORK.WANT has 2 observations and 5 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds
... View more