Hello, I am using a multi-value prompt and have the code below. The prompt is called "DRGFilterCommas". I am getting a message when I run this that "DRGFilterCommas_Count" is not initialized and this is causing the program to work as intended (see below) even though earlier in the log it displays that the value of DRGFilterCommas_Count is 1. Any ideas as to why this is?
My code:
data _null_; length DRGsCommas_List $10000; if symget('DRGFilterCommas_Count')>=1 then do; DRGsCommas_List=cats("'", tranwrd("&DRGFilterCommas", ",", "','"), "'"); put DRGsCommas_List; /* just for checking */ put DRGFilterCommas_COUNT; /* just for checking */ call symputx('DRGsCommas_WHERE_CLAUSE',cats('and dr.DRGCode in (',DRGsCommas_List,')')); call symputx('DRGsCommas_JOIN_CLAUSE','INNER JOIN SQL_STG.DRG dr ON dr.DRGKey = e.DRGKey'); call symputx('DRGs_List_Displayed',DRGFilterCommas); end; else do; call symputx('DRGs_List_Displayed',"ALL"); end; run;
Log shows the following:
%LET DRGFilterCommas_count = 1;
NOTE: Variable DRGFilterCommas_COUNT is uninitialized.
Thanks,
KelseyB
... View more