@Tom If I run the code below, I could see a some blanks in the value of macro variable rprun_pi_val. How to remove the blanks?
%let rprun_pi=main close run(VFB),secondary close run,main close run(BBB),impact of overreturn on CSP,baseline for inital recognition(VFB), Coverage Units new business,main close run mortality,main close run longevity,main close run lapse down,secondary close run mortality,
secondary close run longevity,secondary close run lapse down;
%let rprun_pi_val=%upcase(%unquote(%str(%')%qsysfunc(tranwrd(%superq(rprun_pi),%str(,),','))%str(%')));
%put &=rprun_pi_val;
Results:
26 %let rprun_pi=main close run(VFB),secondary close run,main close run(BBB),impact of overreturn on CSP,baseline for inital
26 ! recognition(VFB), Coverage Units new business,main close run mortality,main close run longevity,main
26 ! close run lapse down,secondary close run mortality,
27 secondary close run longevity,secondary close run lapse down;
28 %let rprun_pi_val=%upcase(%unquote(%str(%')%qsysfunc(tranwrd(%superq(rprun_pi),%str(,),','))%str(%')));
29 %put &=rprun_pi_val;
RPRUN_PI_VAL='MAIN CLOSE RUN(VFB)','SECONDARY CLOSE RUN','MAIN CLOSE RUN(BBB)','IMPACT OF OVERRETURN ON CSP','BASELINE FOR INITAL
RECOGNITION(VFB)',' COVERAGE UNITS NEW BUSINESS','MAIN CLOSE RUN MORTALITY','MAIN CLOSE RUN LONGEVITY','MAIN
CLOSE RUN LAPSE DOWN','SECONDARY CLOSE RUN MORTALITY',' SECONDARY CLOSE RUN LONGEVITY','SECONDARY CLOSE RUN LAPSE DOWN'
Desired results:
26 %let rprun_pi=main close run(VFB),secondary close run,main close run(BBB),impact of overreturn on CSP,baseline for inital
26 ! recognition(VFB), Coverage Units new business,main close run mortality,main close run longevity,main
26 ! close run lapse down,secondary close run mortality,
27 secondary close run longevity,secondary close run lapse down;
28 %let rprun_pi_val=%upcase(%unquote(%str(%')%qsysfunc(tranwrd(%superq(rprun_pi),%str(,),','))%str(%')));
29 %put &=rprun_pi_val;
RPRUN_PI_VAL='MAIN CLOSE RUN(VFB)','SECONDARY CLOSE RUN','MAIN CLOSE RUN(BBB)','IMPACT OF OVERRETURN ON CSP','BASELINE FOR INITAL RECOGNITION(VFB)','COVERAGE UNITS NEW BUSINESS','MAIN CLOSE RUN MORTALITY','MAIN CLOSE RUN LONGEVITY','MAIN
CLOSE RUN LAPSE DOWN','SECONDARY CLOSE RUN MORTALITY','SECONDARY CLOSE RUN LONGEVITY','SECONDARY CLOSE RUN LAPSE DOWN'
... View more