This is what I am trying to do: 1. Create Log file say logfile.txt 2. I run a sas code to fetch all reject details from sas or Orcale table using proc sql 3. Before proc sql begins I will write/append a plain normal string into my logfile.txt saying that "Step:1 Begin of ZZZZZZ" and same for at end of the proc sql 4. Purpose of this is track all codes log in single file, for example any of the table got deleted accidentally I will get get an "not exist error", i need to track this error in my logfile.txt, and to do so I did like %processorlogger(Step:2 End of noofdaysin_reject at &SYSERR &SYSERRORTEXT %sysfunc(datetime(),datetime24.3)); at syserrortext I am getting a warning says "Apparent symbolic reference SYSERRORTEXT not resolved" I am getting the proper error code 1012 for syserr and it gets appends into the file but syserrortext doesn't.., Please note if &syserror was given without quitting proc sql syserr code will be always 0 which is success, so for precise error syserror should be given after quit like below proc sql; select * from DZ.noofdaysin_re /* this is mispelled table */ run; quit; %put SYSERR = &SYSERR; %put SYSERRORTEXT = &SYSERRORTEXT; Hope I made my point clear..!!
... View more