Oh Gosh, you are so close.
So you have a (tested) macro that will take an object name and build a plot, and now you just want to call that for each record in a table... have I got that right?
You could use a Call function called Call Execute() but I became disenchanted with that when it had a memory leak problem on Windows in Version 8. I favour a solution I shall call the Kent solution because in a discussion between He and Me, he gratuitously suggested my alternative approach was better because it was conservative of memory and allowed debugging that throwing commands into memory did not. Here is some code, just a couple of lines to add to your program.
FileName CODEINCL Temp;
Data _NULL_;
Set WORK.UNIQUEOBJECTS;
/* File CODEINCL; */
Put '%Create( ' OBJECTNAME ');';
Run;
%Include CODEINCL;
FileName CODEINCL Clear;
In the data step, the file reference is commented out so that the first time you run it you get all the commands written to the LOG. This allows you to verify the command is well formed. You can also be conservative and run it first time with an ( Obs = 5) option on the Set table so that you don't write many repetitive lines in the log. Don't forget the command must be complete; a common oversight is that there need to be two semi colons around the end of the Put statement. One is inside to write the command to the file, one outside to complete the SAS Put command.
Then when you remove comments from the FILE line, the file is written to and will be submitted in the %include call. Using a Temp reference for the file means SAS will ask the OS to manage the file creation. This means you don't need to think about where you might put it. It also works on all operating systems, so you needn't think about paths, permissions, blocking, deleting old files or anything else when you write the code.
BIG TRAP: Do NOT N O T NOT use double quotes at the Put statement. SAS will attempt to resolve the macro reference, and you don't want that to happen until the command is properly formed in the command file. It's a common problem, and can cause instability in your SAS session with some macros, so I suggest you also save the code before you submit it.
Kind regards
David