LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (September 1997, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 17 Sep 1997 22:49:07 -0400
Reply-To:   Anthony Ayiomamitis <ayiomamitis@IBM.NET>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   Anthony Ayiomamitis <ayiomamitis@IBM.NET>
Subject:   Re: SAS SQL help needed
Content-Type:   text/plain; charset=us-ascii

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 knowledge > > 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 rough. > > > > If anyone can help me with how to update a DB2 table within SAS, it would be > > 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 from > > mainframe. > > > > Joan, > > 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 > table=tblspc.patorder > load; > replace lname = last_name > fname = first_name; > type lname = 'char(20)' > fname = 'char(20)'; > nulls lname = n > fname = n; > run; > > The above PROC is no longer supported by SAS but is still available > and functional. >

Joan,

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 dramatically.

Secondly, this PROC assumes the DB2 table exists. If it does not, DB2UTIL is the procedure of choice.

Anthony.


Back to: Top of message | Previous page | Main SAS-L page