Here is a way to get the job done in a different angle. It has many other usages
15 data _null_;
16 array charv[30] $1 _temporary_ ('a', 'b', 'c', 'd','e', '0');
WARNING: Partial value initialization of the array charv.
17 do i=1 to dim(charv);
18
19 if charv=' ' then leave;
20 put i= charv=;
21
22 end;
23 run;
i=1 charv[1]=a
i=2 charv[2]=b
i=3 charv[3]=c
i=4 charv[4]=d
i=5 charv[5]=e
i=6 charv[6]=0
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds