data have;
input full_names 50.;
datalines;
Austin Richard Post
Quavious Keyate Marshall
David John McDonald
Jonathan Lyndale Kirk
;
run;
Required output first letter of each word as follows
ARP QKM DJM JLK
Something that works regardless of the number of names.
FYI - your sample data step is incorrect and does not run as posted.
data initials;
set have;
nwords = countw(full_names);
length initials $8.;
initials = '';
do i=1 to nwords;
initials = catt(initials, substr(scan(full_names, i), 1, 1));
end;
drop i nwords;
run;