Basics of passing parms to scripts/commands:
IF you are running a "Command" rather than a job, just put the %%var in your command line.
For an imbedded script in your "OS" job. First go to the "Set" tab in your job an create PARM1 and give it a value. Then use "$1" in your unix script or %1 in Windows bat, and you will get whatever you placed in your PARM1. You may do the same thing for PARM2 and so on.
BUT you seem to be getting the values from somewhere and want to create the PARM1 "on the fly". You will have to create a global or table variable using the control-m "setvar" command in one control-M job. And then in the job that runs the script Set tab will set PARM1 to %%WhatYouSet. It is round-about, but it will work.
Now, how to set the Execution node. I cannot help you there. %%vars will NOT work in the Execution Node ID field.
You COULD have the job which sets the %%WhatYouSet parm set a Condition which releases a cyclic job just waiting to run on that server. BUT you would have to have one cyclic job waiting for each possible server. How many possilbe servers? The overhead of cyclic jobs waiting for a condition is pretty low so this might work for you.