Walt Mankowski via plug on 11 Apr 2022 03:32:25 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Book: Modern Mainframe Development


On Mon, Apr 11, 2022 at 12:21:47AM -0400, Steve Litt via plug wrote:
> I've always thought that COBOL has gotten a bad rap. It has built-in
> ISAM, which is pretty darn cool. Except for hitting the hardware
> directly, in COBOL you can do most of what you can do in C,
> including recursion. I don't know if you can pass references
> to paragraphs or linked procedures in order to make callbacks. My only
> real complaint about COBOL is that paragraphs can't have their own local
> variables: Variables are local to the compiled source file only, so you
> need to use CALL to call procedures linked in from other files.

You answered your own question. You need local state to do
recursion. When you PERFORM a paragraph in COBOL it's basically just a
goto. In practice it's not a big deal since there's not much call for
recursion in the sorts of reports, file updates, and simple UI
management tasks that COBOL is traditionally used for.

Walt

Attachment: signature.asc
Description: PGP signature

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug