Note you can just let SAS truncate the value without needing to use the SUBSTR() function. Even when the value is longer than the targeted length.
data table1; length field $20; field='abc4567890abc'; run;
data table2; length field $10; stop; run;
proc sql;
insert into table2 (field)
select * from (select field length=10 from table1)
;
quit;
... View more