Help using Base SAS procedures

Need help for PROC APPEND

Reply
N/A
Posts: 0

Need help for PROC APPEND

HI all,

I have problems with appending a SAS Data set to an oracle table.
Connection to the Oracle-database via the LIBNAME-statement works fine, also the table definition in ORACLE fits with the format definition of my SAS-table at first view. But when I execute a PROC CONTENTS statement on the ORACLE table the column definitions are not the same as in the ORACLE definition (e.g. character 40 in SAS instead of character 30 in ORACLE and so on).
So I always receive warnings in response to my PROC APPEND statement because of different lengths on BASE and DATA files, though the definitions look OK as I mentioned above.

Does anybody know how to solve this problem?

Thanks in advance,
Chris
Super User
Posts: 17,829

Re: Need help for PROC APPEND

have you tried the force option?
Respected Advisor
Posts: 3,892

Re: Need help for PROC APPEND

Hi

From what you describe it's not the format but the length of the character variables which are different. So PROC APPEND is kind of right to issue a truncation warning.

The best solution would be to define the lengths in your SAS data set according to the ones in the ORACLE table.

If this is not possible and you're sure that the columns lengths in ORACLE are sufficient then you could use PROC APPEND NOWARN; to suppress the warnings. Not pretty - but it should work.

HTH
Patrick
Super User
Posts: 9,681

Re: Need help for PROC APPEND

Hi.Patrick.
Long time no see your posting.
Happy Holidays!


Ksharp
Respected Advisor
Posts: 3,892

Re: Need help for PROC APPEND

Hi Ksharp
Yes, real life projects kept me too busy.
Merry Chrismas and happy New Year to you.
Cheers
Patrick
N/A
Posts: 1

Re: Need help for PROC APPEND

Hi. I've used proc append + force + nowarn and it was only partly successful. It supressed most of the warnings except for the data type mismatch (i.e. col1 in BASE has different lengths with that of DATA). Is there a way to suppress this too? Is it documented somewhere why this type of warning is not being suppressed?
Ask a Question
Discussion stats
  • 5 replies
  • 1208 views
  • 0 likes
  • 5 in conversation