Towards the top of my program, I have:
%LOCAL ix;
%LET ix = 1;
%DO ix = 1 %to 4;
%LOCAL corra_&ix;
%LET corra_&ix = 9999;
...
%END;
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)
My problem is coming later on:
%do i = 1 %to 4;
...
CALL SYMPUT(%quote('CORRA_&i'), trim(left(put(DEPEN&i,5.3))));
...
%end;
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?
Thanks in advance.
... View more