i have a left-justified matrix of character labels that i want to right-justify for display.
there is an example in the SAS Help Center for the PUTC function that i have modified to teach myself:
data test;
length a b $ 6 ;
/* 123456 */
a = 'abc ' ;
b = put( a, $6. -R ) ;
put 'a=' a $6. ' b=' b $6. ;
c = right( a ) ;
put 'a=' a $6. ' c=' c $6. ;
run;
and it returns the results correctly:
a=abc b= abc
a=abc c= abc
now, i want to use PROC IML to do a similar task:
proc iml ;
a={ 'a ', 'ab ', ' abc ', 'abcd' } ;
a_put = put( a, '$6. -R' ) ; print a_put ;
a_putc = putc( a, '$6. -R' ) ; print a_putc ;
a_right =right( a ) ; print 'a=' a 'a_right=' a_right ;
quit ;
but the results are different:

note that put() is not defined:
ERROR: Invocation of unresolved module PUT.
no right-justification has been performed. where is my error? how can i achieve my goal?
TIA,
Ross Bettinger