From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,84bf0ec36cf20893 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-28 18:11:23 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Would an *AdaScript* language be a good / bad idea? Date: 28 May 2002 18:11:22 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0205281711.1a446fc5@posting.google.com> References: <5ee5b646.0205140618.2d789fc9@posting.google.com> <5ee5b646.0205151846.4b14a73f@posting.google.com> <3CE3D8B4.C272C737@san.rr.com> <5ee5b646.0205171859.14abf161@posting.google.com> NNTP-Posting-Host: 205.232.38.244 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1022634683 28410 127.0.0.1 (29 May 2002 01:11:23 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 29 May 2002 01:11:23 GMT Xref: archiver1.google.com comp.lang.ada:24883 Date: 2002-05-29T01:11:23+00:00 List-Id: "David Thompson" wrote in message > But to my knowledge only CICS, and Tandem's roughly similar > but much less known PATHWAY, support(ed) adding new modules > transparently to a running program in the fashion of Java or > AIUI Erlang or explicit DLL/so's, much less direct source execution > like shells and awk/perl/etc. (Admittedly CICS may be or have been > the environment for more COBOL code than any single alternative.) Well who knows what "in the fashion of Java" might mean. But it has been standard in COBOL programs for many years, including those running on IBM mainframes, to add new modules dynamically at runtime. Typically you have a file that contains a list of valid transaction names. Then if a transaction name is validated against this list, you simply do the CALL to process it. The form of CALL is CALL xxx USING yyy where xxx is a dataname (variable) containing the name of the procedure to call, and yyy are the parameters. The module containing the code for xxx is loaded dynamically and the call made. Now to add a new module to a running program without stopping it, we a) compile and link the code for the new transaction b) install the load module in the appropriate place where it can be located c) update the file with the list of valid transactions to enable access to the new transaction. This is standard COBOL stuff and must work on any ANSI standard conforming COBOL compiler. Now of course, though semantically, all binding to subroutines (called confusingly programs in COBOL, the term run unit being used to describe what others call a program), is dynamic at runtime, in practice most calls look like: CALL "STANDARD-ROUTINE" USING ... So that the name is known at compile time, and typical COBOL systems provide for static linking in cases like this (though of course this is outside the standard in any case). Off topic for Ada, sure, but it is always interesting to be aware of what capabilities other languages have. I was demonstrating Realia COBOL and its visual debugger to Jean Ichbiah and showing him how the debugger handled this kind of dynamic linkage, and he was quite surprised to find that COBOL had that feature (as are many others in the programming language field, who seem to share a lack of knowledge of COBOL in common :-)