%LET ix = 1;
%DO ix = 1 %to 4;
%LET corra_&ix = 9999;
This compiles and runs without problems. I call %PUT _USER_ and I see all my variables defined among the others I have. (I've initialised them to 9999 because I can see later if any operations have been carried out later)
When the program runs, I want the result to be
CALL SYMPUT('CORRA_1', trim(left(...)));
CALL SYMPUT('CORRA_2', trim(left(...)));
CALL SYMPUT('CORRA_3', trim(left(...)));
CALL SYMPUT('CORRA_4', trim(left(...)));
But I cannot for the life of me work out how to correctly resolve this. I'm either receiving notes in my log that my variable is uninitialised, or that the 'Apparent Symbolic Reference is not resolved'. In any case, when I use %PUT _USER_; later on, the variables are still equal to 9999.
What should I put in place of the bold text to make this work?
Run this test. [pre]
%let i = 5;
depen5 = 64.3;
CALL SYMPUT("CORRA_&i", trim(left(put(DEPEN&i,5.3))));
Unless you need the single quotes for something else that was going on in the program, you can replace the %quote function with double quotes and the resolution should be OK.