Anthony Ayiomamitis wrote:
> Jbp797 wrote:
> > All -
> > We're currently bringing patient info in from the AS/400 to flat file and
> > I'm trying
> > to create a SAS program to update a DB2 table with this info. My SAS
> > is mediocre, normally used for updating files for reporting purposes.
> > I was trying to locate the SAS Guide to SQL Procedure, but the going is
> > If anyone can help me with how to update a DB2 table within SAS, it would
> > greatly appreciated, as my time is running short, for the reason for this
> > is to replace a FOCUS/CMS/VM application for patient ordering/confirmation
> > mainframe.
> I think by update you really mean append. To append to an existing
> table, you can use a PROC DB2LOAD on the DB2 table using something like
> the following:
> proc db2load data =work.joan
> replace lname = last_name
> fname = first_name;
> type lname = 'char(20)'
> fname = 'char(20)';
> nulls lname = n
> fname = n;
> The above PROC is no longer supported by SAS but is still available
> and functional.
I inadvertently left out a couple of tips ... the default "commit"
3 observations (as I recall). Please make sure you redefine this number
to something much larger or otherwise your CPU consumption will increase
Secondly, this PROC assumes the DB2 table exists. If it does not,
DB2UTIL is the procedure of choice.