Does anyone know how to stop PROC SQL from writing WARNING: line into SAS log when remote database sends back INFO message when using EXECUTE() statement in PROC SQL to push commands into the database?
I was using SAS/Access to ODBC with a Redshift database and issuing COPY command to load into a table from files on S3 bucket. The command runs fine, but I get a WARNING in the SAS log.
WARNING: During execute: INFO: Load into table 'bucket_test' completed, 19 record(s) loaded successfully.
Is there some SAS option, PROC SQL option or ODBC connection option that will make PROC SQL not describe that note as a WARNING? Or perhaps some Redshift option that could stop it from sending the status message back?
proc sql noprint ;
connect to odbc .....;
execute(
copy &schema..&table
from %squote(s3://&bucket/sas_upload&path/&fname)
access_key_id &keyid secret_access_key &secret
delimiter '|' gzip csv
blanksasnull emptyasnull
dateformat 'auto' timeformat 'auto'
) by odbc;
quit;
@ChrisNZ wrote:
Maybe
proc sql nowarn;
would work?
Good idea, but unfortunately it does not help.
Maybe a setting in the ODBC driver to not pass back messages then?
But the message is useful, not a warning, and SAS misinterprets it.
So it looks like it's time to raise a defect with tech support.
As a workaround for clean log, a quick proc printto may be necessary until the defect is fixed.
You can even read the log file right away and output the useful information back to the log.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.