BookmarkSubscribeRSS Feed
SASAna
Quartz | Level 8

Hi SAS users,

 

I am loading SAS dataset to ORacle table of around 500 attributes. I am getting big list of warnings of base and data length. How to hide them to not show in the log?

 

Below is my proc statement and i have used NOWARN

 

Proc Append Base=<Oracle_table> Data=FINAL FORCE NOWARN; run;

 

Thanks,

Ana

4 REPLIES 4
Quentin
Super User

If it's just conflicts in variable lengths, probably would be easiest to fix the length of variables in work.final to match the length of columns in oracle_table.  

The Boston Area SAS Users Group (BASUG) is hosting an in person Meeting & Training on June 27!
Full details and registration info at https://www.basug.org/events.
s_lassen
Meteorite | Level 14

As others have remarked, the messages are there for a reason. But on the other hand, you may have character columns that are shorter that the corresponding columns in Oracle. That is not really a problem, and I agree that it can be kind of irritating to see all those messages for no other reason than that.

 

One fast and dirty solution could be this: modify your FINAL table to look like the Oracle table:

options compress=char; /* saves disk space when a lot of text columns are longer that necessary */

data final;
  if 0 then set <Oracle_table>; /* All the relevant variables should then have the right attributes */
  /* here goes the rest of the code to create WORK.FINAL */
  /* but excluding LENGTH statements for output variables, they are already declared */
run;

Proc append base=<Oracle_table> data=FINAL; /* FORCE should not be necessary */
run;

Or, if the final data step ends up taking too long and using too much disk space that way, you can create a data step view:

data v_FINAL/view=v_FINAL;
  if 0 then set <Oracle_table>;
  set FINAL;
run;

Proc append base=<Oracle_table> data=v_FINAL;
run;

 

Just make sure that you are not missing anything important by doing this (scrutinize those pesky warnings before you go fast and dirty).

Ksharp
Super User
Do you try PROC SQL + INSERT INTO ?

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 3552 views
  • 1 like
  • 5 in conversation