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