Re: Stop Run vs GoBack
- From: "Roger While" <simrw@xxxxxxxxxxxx>
- Date: Tue, 26 Jun 2007 06:21:16 +0200
"Frank Swarbrick" <Frank.Swarbrick@xxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:46800366.6F0F.0085.0@xxxxxxxxxxxxxxxxx
<snip>
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.
:-)
OC, as per 2002 standard, allows BASED in WORKING/LINKAGE/LOCAL
sections.
You can also use the SET verb to set (sic) the addressability of
L/S items.
Of course, ABSENCE of L/S does not imply anything about a
program either.
In fact, I have 2 ported apps that each contain a prog (without L/S) that is
both run as a free-standing (main) program and as a callable
module.
Original machine environment for these app's is unknown
except it was "big iron".
Interestingly enough, both of these progs have a single exit
point which is an EXIT PROGRAM as the last statement in
the source. (That, at least, is the state in which I received them;
I can not say if they have been modified from the real original)
Roger
.
- Follow-Ups:
- Re: Stop Run vs GoBack
- From: Rick Smith
- Re: Stop Run vs GoBack
- References:
- Stop Run vs GoBack
- From: William M. Klein
- Re: Stop Run vs GoBack
- From: Howard Brazee
- Re: Stop Run vs GoBack
- From: Frank Swarbrick
- Stop Run vs GoBack
- Prev by Date: Re: COBOL record length on z/series
- Next by Date: Help: Anyone have a demo about "Hello World" on windows OS with Micro Focus COBOL
- Previous by thread: Re: Stop Run vs GoBack
- Next by thread: Re: Stop Run vs GoBack
- Index(es):
Relevant Pages
|