This is the log of mmy code which does not give an error but still if I try to reference the value n_lcg I get an error that the value cannot be resolved.
How do I resove this error?
213 PROC SQL STIMER noprint;
NOTE: SQL Statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
214 CONNECT TO &tera;
NOTE: SQL Statement used (Total process time):
real time 0.38 seconds
cpu time 0.02 seconds
215 create table cnt_lcg as
216 select * from CONNECTION TO teradata
217 (select count(*) as cnt from user_wrk.sa_lgc );
NOTE: Table WORK.CNT_LCG created, with 1 rows and 1 columns.
NOTE: SQL Statement used (Total process time):
real time 19.53 seconds
cpu time 0.00 seconds
218
235 select cnt into :n_lcg from cnt_lcg;
NOTE: SQL Statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
245 disconnect from teradata;
NOTE: SQL Statement used (Total process time):
real time 0.07 seconds
cpu time 0.01 seconds
246 quit;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
%macro check_n;
108 /*%if %eval(&n_lcg) = 0 %then %do;
109 %let err=No Records in sa_lgc;
110 %job_log(id=&job_id,job_nm=JOB1,remark=&err,m_id=WAP,stat=Complete);
111
112 %put endsas1;
113 %end;*/
WARNING: Apparent symbolic reference N_lcg not resolved.
Thank you!