Deutsch English Français Italiano |
<vaahnh$22g6$1@gal.iecc.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.iecc.com!.POSTED.news.iecc.com!not-for-mail From: John Levine <johnl@taugh.com> Newsgroups: comp.arch Subject: Re: COBOL, Article on new mainframe use Date: Fri, 23 Aug 2024 17:43:13 -0000 (UTC) Organization: Taughannock Networks Message-ID: <vaahnh$22g6$1@gal.iecc.com> References: <v9t3ih$2e8ee$1@dont-email.me> <20240823112029.00002202@yahoo.com> <va9hep$riee$1@dont-email.me> <20240823115440.0000782b@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 23 Aug 2024 17:43:13 -0000 (UTC) Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="68102"; mail-complaints-to="abuse@iecc.com" In-Reply-To: <v9t3ih$2e8ee$1@dont-email.me> <20240823112029.00002202@yahoo.com> <va9hep$riee$1@dont-email.me> <20240823115440.0000782b@yahoo.com> Cleverness: some X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Originator: johnl@iecc.com (John Levine) Bytes: 2939 Lines: 43 According to Michael S <already5chosen@yahoo.com>: >> >> I once ported a COBOL-specific algorithm to Pascal, which meant >> >> that I had to reimplement code for all the 80-col punch card >> >> formatted IO as well as sorting according to quite special rules. >> >> >> >> The original was 25 pages, my replacement ~5, at least half of >> >> which was the COBOL specific function replacements, so the >> >> mainline code became an order of magnitude smaller. >My assumption was that majority of size reduction happened due to >identifying repeated patterns and implementing them as subroutines. >Which could be done in any reasonable language. I know nothing about >COBOL, but hope that it supports subroutines. COBOL is by design, really really verbose, e.g. what we would write as tg = kb + ro is ADD KICK-BACK TO RAKE-OFF GIVING TOTAL-GRAFT. It has only weak subroutines. You can say PERFORM PARA1 THRU PARA2 VARYING THING-INDEX FROM THING-BASE TO THING-LIMIT. it will set THING-BASE, jump to PARA1 and loop and return at the end of PARA2 more or less like a FOR loop, but handling the parameters beyond that is up to you. At least in IBM COBOL there is a way to break up a program into subroutines you can call with parameters but there is so much mandatory glop for each routine (the whole ENVIRONMENT DIVISION, DATA DIVISION thing) that you're not going to end up with a short program. Also, as someone else keeps pointing out, any sort of string processing beyond putting stuff in fixed fields is very painful. >I simply don't see how mere syntax difference between COBOL and Pascal, You should look at some COBOL programs. It's a whole different world. -- Regards, John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies", Please consider the environment before reading this e-mail. https://jl.ly