Yes, I think you have hit the nail on the head there KurtBremser. The INSERTC command takes this form:
rc=INSERTC(list-id,cval<,index<,name>>);
Now what is appears he is trying to do is use the iterator i to indicate if the value should be string1 or string2. As I said its been a long time since I used this, so am fixed on arrays, or macro. However the question I would say is why have string1/2/3 etc. as macro variables in the first place. Why not insert these into a list of thier own:
if anyspace(selpath) then do;
stringlist=makelist();
stringlist=insertc(stringlist,"Path Should Not Contain Blank Spaces",1);
stringlist=insertc(stringlist,"select another path",2);
link errormsg;
tmp_lstbtn._cursor();
return;
end;
SCL lists are the method for handling lists of values, so use them rather than creating macro variables?
... View more