Hi Jaap, If I run part by part working fine.. kind of weird. As you have mentioned it looks like timing issue. Now I used 2 data steps in the macro. so far working fine and I used %eval for do loop. see the following corrected program. Thanks for you suggestion.. %macro datapgm(pgm=); data ttft; set adam.toc_prog; where pgm_id = "&pgm"; %global nbt nbf outname pgmpath; call symput('nbt', compress(input(strip(put(numtitle,3.)),$3.))); call symput('nbf', compress(input(strip(put(numfoot,3.)),$3.))); call symput('outname', compress(strip(outname))); call symput('pgmpath',compress(strip(pgmpath))); run; data _NULL_; set ttft; %do i = 1 %to %eval(&nbt); %global t&i; call symput('t'||"&i",strip(title_&i)); %end; %do j = 1 %to %eval(&nbf); %global f&j; call symput('f'||"&j", strip(foot_&j)); %end; run; %mend;
... View more