BookmarkSubscribeRSS Feed
Tom
Super User Tom
Super User

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;

 

3 REPLIES 3
Tom
Super User Tom
Super User

@ChrisNZ wrote:

Maybe

proc sql nowarn; 

would work?


Good idea, but unfortunately it does not help.

ChrisNZ
Tourmaline | Level 20

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. 

 

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to connect to databases in SAS Viya

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.

Discussion stats
  • 3 replies
  • 1093 views
  • 0 likes
  • 2 in conversation