Still struggling now with a slightly different syntax issue. My program reads in the Rule variable as:
Rule:
NVL(A.INTER_SCF_EXCL_IND ,'T') <> NVL(B.INTER_SCF_EXCL_IND ,'T')
But the %PUT statement is still outputting a trucated version:
HERE!!! COALESCE(A.INTER_SCF_EXCL_IND ,'T') <> COALESCE(B.INTER_SCF_EXCL_IND ,
I'm so frustrated!
data QueryRules;
infile datalines;
input rule $70.;
datalines;
NVL(A.INTER_SCF_EXCL_IND ,'T') <> NVL(B.INTER_SCF_EXCL_IND ,'T')
;
* Recodes to fix inconsistancies in Rule code so it will run on IBMs database and run using SAS instead of plsql ;
data QueryRules;
set QueryRules;
* SASs equiv of Oracles NVL function ;
rule = tranwrd(rule,"NVL(", "COALESCE(");
run;
proc sql;
select trim(rule) into : rule_list separated by "#" from QueryRules;
quit;
%put HERE!!! &rule_list;
The problem is a little different this time ... but it is something you might be able to figure out. Just in case you want to work on it with that clue, I've moved the answer further down on the screen.
The length of your variable is $70. That's fine when you start out. But when you replace NVL with COALESCE, you need a longer variable.
The problem is a little different this time ... but it is something you might be able to figure out. Just in case you want to work on it with that clue, I've moved the answer further down on the screen.
The length of your variable is $70. That's fine when you start out. But when you replace NVL with COALESCE, you need a longer variable.
OMG! I just wasn't even looking in that direction. Thanks so much!
@Astounding That's what the spoiler tag is for 🙂 The little guy hiding his face on the tool bar.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.