Hey Everyone, Thanks for the assistance! We tried each of the solutions independently and unfortunately, each had their own emergent error. That said, it helped us identify a way to hardcode in a solution. Initially, the application of nliteral(name) to any part of the code caused the following error: put "&var_list_csv.";
NOTE: Line generated by the macro variable "VAR_LIST_CSV".
65 "BUILD_HEDIS_YR, BUILD_CODE, SECUR_LBL_CODE, RPTG_LOB, GRP_ID, GRP_NAME, QLTY_RATING_OVRL_SCORE, PANEL_SIZE, ! "90_DAY_RATE"N, P4Q_PTNTL_MAX_AMT
NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space
between a quoted string and the succeeding identifier is recommended.
ERROR 22-322: Syntax error, expecting one of the following: a name, #, +, @. However, that indicated that the issue was because the 90_day_rate field was already being passed into sashelp.vcolumn as a literal, and was incorrectly being parsed into two separate fields (with the _day_rate field being unitialized). With that in mind, we hardcoded in a solution to check for that specific issue, and throw an exception which forced sashelp.vcolumn to use the entire field. This (while being inelegant) allowed us to keep the existing format, and properly initialize all of the variables. Ultimately, we swapped out this: proc sql noprint;
select name into :var_list_csv separated by ", " from sashelp.vcolumn where libname = upper("&lib_name") and memname = upper("&dsn_name");
select name into :var_list separated by " " from sashelp.vcolumn where libname = upper("&lib_name") and memname = upper("&dsn_name");
quit; for this: proc sql noprint; select case when substr(name,1,2)="90" then cats("'",name,"'n") else name end into :var_list_csv separated by ", " from sashelp.vcolumn where libname = upper("&lib_name") and memname = upper("&dsn_name"); select case when substr(name,1,2)="90" then cats("'",name,"'n") else name end into :var_list separated by " " from sashelp.vcolumn where libname = upper("&lib_name") and memname = upper("&dsn_name"); quit; Either way, couldn't have figured it out without learning about the Nliteral(name) function! Thanks!
... View more