Have you tried using a data step or sql view to get rid of the
predefined formats for purposes of loading? For example,
data LoadView / view=LoadView;
format _all_ ;
Then specify LoadView as input to your PROC DBLOAD. Your original
dataset is maintained, but the format information is not passed to
>>> "Stephen Hirsch" <stephen.hirsch@PHARMA.NOVARTIS.COM> 01/28/04
It doesn't look like there's going to be an easy solution. SAS always
seems to break your heart (:=(. Let me explain more fully what I am
trying to do.
I get SAS datasets from CROs that I need to copy into Oracle tables.
Sometimes the CROs send data that is too big for the target column in
the Oracle tables; instead of just crashing and debugging one column
at a time, I'd like to fail gracefully and create an easily readable
error report that non-technical people can read. Therefore, it is very
important that I maintain the metadata; I can't wipe out the formats
just in order to load the data.
Once the data is in Oracle, I can create this metadata error report
very easily. It's just that I was using PROC DBLOAD to move the data
from the SAS dataset to Oracle. The SAS Institute offered to maybe add
an option to PROC DBLOAD to check every variable's format, to see if
they would print as ***** and fix it. That would take months for them
to do, and them months for us to put it into production here (don't
I see 2 possible fixes to this design flaw in PROC DBLOAD: one, create
a generic macro using PROC ACCESS and PROC SQL, or two, create a
generic macro that would take a SAS dataset and copy it to a new
dataset with "correct" formats.
Anybody out there have another idea? Anybody out there have a macro I
could use that does one of those 2 things?