Hello experts,
if I have a string defined as &a and I want to grab all the string prior to @ from the whole string as defined by the %macro a %put. how do I achieve the result?
the following macro a is not working...
%let a=%str(SELECT a.ITS_ORIG_STN_CD , a.ITS_ORIG_STN_DS , b.CODE_CD, b.SUB_CODE_CD, b.CODE_TYPE_GP, b.CODE_LITERAL_DS from DS_LEAP.DS_ACCUSED a INNER JOIN DS_LEAP.DS_CODE_TABLE b ON ( a.ITS_ORIG_STN_CD = b.CODE_CD ) WHERE b.CODE_TYPE_GP = '0026' AND a.ITS_ORIG_STN_DS <> b.CODE_LITERAL_DS@a);
%macro a;
%put %scan(%nrstr(&a),1,'@');
%mend;
%a;
Thanks
... View more