Re: Stop Run vs GoBack
- From: "Frank Swarbrick" <Frank.Swarbrick@xxxxxxxxxxxxxx>
- Date: Mon, 25 Jun 2007 18:03:18 -0600
<62nv73llefa7mdevhm4gb5bk50uu6t9r6j@xxxxxxx>, HowardOn 6/25/2007 at 9:18 AM, in message
Brazee<howard@xxxxxxxxxx> wrote:
On Sun, 24 Jun 2007 18:35:20 GMT, "William M. Klein"
<wmklein@xxxxxxxxxxxxxxxxx> wrote:
3) COBOL (unlike many - possibly MOST - other languages) does NOT require
you to
"declare" a program as either a "MAIN" or "SUB" at compile time. (Having
a
LINKAGE section *implies* that you are a subprogram, but that is neither
required nor universally even true if you access the fields in it).
The LINKAGE section had some interesting variations. On the Univac
9030 (around 1980), most all of our data fields were in the Linkage
Division for our pseudo-conversational programs. They were called by
the program that ran on-line stuff. Other computer systems got the
same results without a LINKAGE section.
Perhaps I shouldn't start this, but...
While use of a LINKAGE SECTION seems to imply that the program is a
sub-program, it is not necessarily true for two reasons.
1) As you (or someone) mentioned, main programs on IBM mainframes can have a
LINKAGE SECTION to receive "command line parameters" from the operating
environment.
2) For those COBOLs without BASED storage (which is pretty much all of them,
as far as I can tell, with a few exceptions (OpenCobol and Fujitsu-Siemens
COBOL2000 are the only ones I know about) you have to use the linkage
section to be able to address dynamically allocated storage (such as storage
allocated using GETMAIN in CICS or storage using the new COBOL "ALLOCATE"
statement. Even in FS COBOL2000 the BASED clause is only allowed on a
LINKAGE SECTION item, so this almost defeats its purpose.
Maybe the LINKAGE SECTION should be renamed the BASED-STORAGE SECTION. :-)
Frank
.
- Follow-Ups:
- Re: Stop Run vs GoBack
- From: Roger While
- Re: Stop Run vs GoBack
- References:
- Stop Run vs GoBack
- From: William M. Klein
- Re: Stop Run vs GoBack
- From: Howard Brazee
- Stop Run vs GoBack
- Prev by Date: Re: Stop Run vs GoBack
- Next by Date: Re: COBOL record length on z/series
- Previous by thread: Re: Stop Run vs GoBack
- Next by thread: Re: Stop Run vs GoBack
- Index(es):
Relevant Pages
|