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

Re: Program Termination (was COBOL record length on z/series)
"Joel C. Ewing" <jcREMOVEewing@CAPS.acm.org> wrote in message
news:de0fi.102$tj6.15@newsread4.news.pas.earthlink.net...
> donald tees wrote: 
>
> While the observations on "GOBACK" are valid for OS/360 and its successor
> Operating Systems on IBM mainframes, they would not have been valid for
> DOS/VS and DOS/VSE Operating Systems on IBM mainframes in early 1980's.
> On those Operating Systems the actual machine command sequence for
> terminating subroutines and main programs were different: subroutines
> essentially used OS/360 linkage conventions with "BR R14" to return; main
> programs had to use a special EOJ SVC call to terminate (BR R14 would
> "blow chunks").  I'm pretty sure failing to properly differentiate in
> COBOL between "GOBACK" and "STOP RUN" in that environment was fatal.
>
> Not having used the DOS family of Operating Systems for over 20 years, I
> can't say whether today's derivatives of DOS/VSE (z/VSE?) have similar
> issues; but it may be rash to presume that the intended semantic
> differences between these two termination statements never matter.
>
> Much of programming style is subjective, but to me using GOBACK to
> terminate a main program would appear to be a violation of the intended
> semantic conventions of COBOL, making it less obvious to a viewer of the
> code that it is intended to be used as a main program.  That it may
> achieve the desired effect in your environment may be "nice", but that
> still doesn't mean it's semantically correct.  If it's not semantically
> correct, there is always the possibility it might at some point cause
> problems with code portability.
>
Thanks Joel. This helped me put my finger on what it was that flagged it to
me. I came out of the background you describe and I'm sure you're right
about the BR 14 vs SVC (I think it was 15 or 16, can't really remember
now...).

But leaving all of that aside, it just seems "illogical" to terminate a main
program with GOBACK. I accept the idea that it is returning to the OS, but
that's pretty tenuous, given that EVERYTHING returns to the OS eventually.

You summed it up perfectly:

"...to me using GOBACK to  terminate a main program would appear to be a
violation of the intended
semantic conventions of COBOL, making it less obvious to a viewer of the
code that it is intended to be used as a main program. "

I feel much better now... :-)

Pete.



Report this thread to moderator Post Follow-up to this message
Old Post
Pete Dashwood
06-23-07 08:55 AM


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:08 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.