LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2002, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 10 Sep 2002 04:05:38 +0000
Reply-To:     sashole@bellsouth.net
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Paul Dorfman <paul_dorfman@HOTMAIL.COM>
Subject:      Re: SAS 2 COBOL
Comments: To: JackHamilton@FIRSTHEALTH.COM
Content-Type: text/plain; format=flowed

>This rule might not hold in the case of access to external databases. >According to a friend of mine who uses both COBOL and SAS with DB/2, >there are some cases in which COBOL beats the pants of SAS, due to some >inefficiencies in the way SAS handles the interface. If SAS allowed >dynamic WHERE clauses in the data step, some of this problem would go >away (can code around it, but it's a lot of work).

Jack,

Funny you cite this kind of situation. Sure you are right that at times (especially before the LIBNAME to DB2 and DBKEY= option had become available), a SAS programmer has to exhibit certain ingenuity in order to use an external database efficiently, utilize existing DB2 indices, etc. However, in my experience, SAS deficiencies in this respect are more than offset by the way COBOL programmers are taught to reason programmatically. In fact, the most outrageous example of SAS beating the pants of COBOL I think I have mentioned earlier pertained to a COBOL program written to create something akin to X*Y*Z tables statement in FREQ. X, Y, and Z resided in three different tables, and for each X, the program would open a cursor against the table with Y, and if that one was returned SQLRC=0, open a cursor against Z, and so on, and proceed with convoluted logic incrementing counters. The program failed to finish in time=1440. Merely dumping the tables via Pass-Thru into views, merging those, and FREQing the result ran in less than a minute.

In general, I would say that I cannot fancy a real-world RSBMS access situation where I would be hard-pressed to use COBOL instead of SAS to achieve a substantial win in peformance. The reason is simple. If there are no DB2 indices defined, or more than 10% of the table is accessed via an index, both SAS or COBOL are bound to read tables sequentially, which sucks no matter which language is being used because of the very RDBMS nature. If there are indices, they can be practically always utilized in SAS either via DBKEY= or by writing a Data step flexcode or macro, which is pretty straightforward, even though in COBOL, cursor processing does look more natural. However, I am not sure that all the wordy stuff one has to pile up on top of it is worth the effort. Of course, COBOL programmers are much better typists, so for them, it most likely does not matter.

Kind regards, ========================= Paul M. Dorfman Jacksonville, FL =========================

_________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com


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