Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

CANCEL (85) and multiple levels of called programs
Hi,

Could someone confirm my understanding of CANCEL (85 version). As I understa
nd
it, if I cancel a program that I have called, it should reset the working
storage to initial values ready for the next time I call it again. And from 
the
85 version onwards, it should also cancel any programs were called by the
program that I called. Right?

I'm on Windows with Micros Focus Net Express 3.1, and have something like th
is:

Prog1 (exe) --CALL--> Prog2 (dll) --CALL-> Prog3 (dll)
Prog1 then cancels Prog2.
Prog1 (exe) --CALL--> Prog2 (dll) --CALL-> Prog3 (dll)
Prog2 working storage has been reset.
Prog3 working storage has *not* been reset.

This would seem to contradict my understanding. So am I wrong, or is MF doin
g
something wrong?

TIA,
Richard



Report this thread to moderator Post Follow-up to this message
Old Post
Richard Antony Burton
06-17-04 01:55 AM


Re: CANCEL (85) and multiple levels of called programs
"Richard Antony Burton" <richardaburton-NOSPAM-@hotmail.com> wrote:

>Hi,
>
>Could someone confirm my understanding of CANCEL (85 version). As I underst
and
>it, if I cancel a program that I have called, it should reset the working
>storage to initial values ready for the next time I call it again. And from
 the
>85 version onwards, it should also cancel any programs were called by the
>program that I called. Right?
>
>I'm on Windows with Micros Focus Net Express 3.1, and have something like t
his:
>
>Prog1 (exe) --CALL--> Prog2 (dll) --CALL-> Prog3 (dll)
>Prog1 then cancels Prog2.
>Prog1 (exe) --CALL--> Prog2 (dll) --CALL-> Prog3 (dll)
>Prog2 working storage has been reset.
>Prog3 working storage has *not* been reset.
>
>This would seem to contradict my understanding. So am I wrong, or is MF doi
ng
>something wrong?

MF is doing it right. Prog3 must be cancelled explicitly by prog2, its logic
al
parent, or by prog1, which would be poor structure IMO.

The Standard says a cancel will automatically cancel programs INCLUDED in pr
og2,
not those called by prog2. Included means nested compilations i.e. in the so
urce
file of prog2.

If you want initial values always, an alternative to cancel is INITIAL in
program-id.

Report this thread to moderator Post Follow-up to this message
Old Post
Robert Wagner
06-17-04 01:55 AM


Re: CANCEL (85) and multiple levels of called programs
"Robert Wagner" <robert.deletethis@wagner.net> wrote in message
news:40d0bdd5.22483499@news.optonline.net...

> MF is doing it right. Prog3 must be cancelled explicitly by prog2, its
logical
> parent, or by prog1, which would be poor structure IMO.

Thanks for clearing that up.

Richard.



Report this thread to moderator Post Follow-up to this message
Old Post
Richard Antony Burton
06-18-04 01:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:27 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.