For Programmers: Free Programming Magazines  


Home > Archive > Cobol > March 2007 > OVERLAY









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author OVERLAY
harsha

2007-03-12, 9:55 pm

Hi,

Could anyone please provide me some details on how to use OVERLAY in
mainframe COBOL programming....

I am looking for details about the syntax and related commands

Thanks in advance.

Thank you,
Harsha

CG

2007-03-12, 9:55 pm

harsha wrote:
> Hi,
>
> Could anyone please provide me some details on how to use OVERLAY in
> mainframe COBOL programming....
>
> I am looking for details about the syntax and related commands
>
> Thanks in advance.
>
> Thank you,
> Harsha


I assume you are asking about the process of using overlay structures in
creating a load module.

First, if you don't know how, that is probably GOOD! WHY on earth [or
anywhere else after 1970] would you want to do this? It is a poor
performer, it is fraught with risk if not done exactly right and, with
2GB of virtual storage, do you really need more space for CODE?

If you really INSIST on doing this, OVERLAY is implemented by the
linker/binder not by the application.

Now, if you are talking about the overlay feature of the Standard
COBOL 85 segmentation module, that function is not supported by the
Enterprise COBOL compiler. So, the answer is, "You don't!" Again,
though, why would you even want to?

Carl
William M. Klein

2007-03-12, 9:55 pm

Carl has answered assuming you are talking about the "OVERLAY" feature of COBOL
where you "swap in and swap out" various SECTIONs of your code. Although
current IBM COBOL products accept the ANSI Standard syntax for doing this, they
don't actually *DO* any storage manipulation for it. (They also don't do
certain "refreshing" semantics expected by the syntax that they allow - but
ignore.)

If you are asking because you have existing OS/VS COBOL (or earlier) source code
that RELIES on the *behavior* of SEGMENTATION and you are trying to upgrade to a
newer version, then you should read:

http://publibz.boulder.ibm.com/cgi-.../igy3mg32/4.1.7

and look for:
Segmentation changes--PERFORM statement in independent segments

If, you actually need to MAINTAIN an OS/VS COBOL program that uses "overlay"
(and runs below the 16M line), then you should get a hold of the OS/VS COBOL
Programming Guide (that was never issued in "online" format) and see what it
says about this. There was a fairly detailed description in it. I could get
page and section number references for you - assuming you actually have a
hardcopy of the manual.

****

On the other hand, if you are using "OVERLAY" in the sense of two data
descriptions referring to the same storage, then you should look at the COBOL
"REDEFINES" (and possibly RENAMES) features. If you are an "experienced"
programmer and you really are talking about the other meaning, sorry to "insult"
you by asking about this. However, your use of "overlay" wasn't entirely clear
to me in your original question.

--
Bill Klein
wmklein <at> ix.netcom.com
"harsha" <harshaa@gmail.com> wrote in message
news:1173717565.918450.193950@8g2000cwh.googlegroups.com...
> Hi,
>
> Could anyone please provide me some details on how to use OVERLAY in
> mainframe COBOL programming....
>
> I am looking for details about the syntax and related commands
>
> Thanks in advance.
>
> Thank you,
> Harsha
>



harsha

2007-03-13, 6:55 pm

On Mar 12, 1:14 pm, CG <Carl.Gehr.ButNoSPAMSt...@MCGCG.Com> wrote:
> harsha wrote:
>
>
>
>
>
> I assume you are asking about the process of using overlay structures in
> creating a load module.
>
> First, if you don't know how, that is probably GOOD! WHY on earth [or
> anywhere else after 1970] would you want to do this? It is a poor
> performer, it is fraught with risk if not done exactly right and, with
> 2GB of virtual storage, do you really need more space for CODE?
>
> If you really INSIST on doing this, OVERLAY is implemented by the
> linker/binder not by the application.
>
> Now, if you are talking about the overlay feature of the Standard
> COBOL 85 segmentation module, that function is not supported by the
> Enterprise COBOL compiler. So, the answer is, "You don't!" Again,
> though, why would you even want to?
>
> Carl


Thanks a lot for the informative response.

Actually I need to to MAINTAIN a cobol program which uses OVERLAY...

As Bill had adviced, I will try to get the hardcopy of the book !

Thank you,
Harsha

Howard Brazee

2007-03-13, 6:55 pm

On 13 Mar 2007 08:33:16 -0700, "harsha" <harshaa@gmail.com> wrote:

>
>Actually I need to to MAINTAIN a cobol program which uses OVERLAY...


What compiler are you using?
CG

2007-03-13, 6:55 pm

Howard Brazee wrote:
> On 13 Mar 2007 08:33:16 -0700, "harsha" <harshaa@gmail.com> wrote:
>
>
> What compiler are you using?

And, which interpretation of the term 'OVERLAY' are you intending?
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com