HP3000-L Archives

November 1997, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Steve Dirickson b894 WestWin <[log in to unmask]>
Reply To:
Steve Dirickson b894 WestWin <[log in to unmask]>
Date:
Wed, 5 Nov 1997 19:27:00 P
Content-Type:
text/plain
Parts/Attachments:
text/plain (35 lines)
<<Be carefull not to malign COBOL. With the organizational techiniques
I've been using for 15+ years I can access any Image DB with 2 COPYLIB
references in the Data Division and one COPYLIB reference in the
PROCEDURE Division for each Image function with a corresponding PERFORM.
Using this technique with other "encapsulation" concepts I've generated
2000+ lines of COBOL code with 200 lines       of source. Makes for very
fast program generation!>>


Wasn't maligning it (well, not much anyway... ;-)

I've simply never seen any other language that can perform the equivalent
of something like

set(key)list(KEYALIASVALUE); list(key)KEYITEM;
move (FIELD1) = "LA"; set(match)list(FIELD1),le;
move (FIELD3) = "9B"; set(match)list(FIELD3),scan;
find(chain) DETAILSET, list=(FIELD1,FIELD2,FIELD3,FIELD4),
sort=(FIELD1,FIELD4(DES)), perform=PROCESS_DATA, error=HANDLE-PROBLEM(*);

in less than several dozen lines of code. And this is the entire
compileable source; it doesn't expand into those several dozen lines.


[for those who don't speak Transact, this code says "retrieve FIELD1,
FIELD2, FIELD3, and FIELD4 values from detail set DETAILSET where FIELD1
is less than or equal to "LA" and FIELD3 contains the sequence "9B",
using a forward chain read on the KEYITEM search item with the
search-item value contained in ALIASVALUE, sorting by FIELD1 in ascending
order with a second-level sort on FIELD4 in descending order, passing
qualifying values to the routine PROCESS_DATA, and branching to the
routine HANDLE_PROBLEM if an error occurs".]

Steve

ATOM RSS1 RSS2