For Programmers: Free Programming Magazines  


Home > Archive > Cobol > July 2007 > Re: Program Termination (was COBOL record length on z/series)









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 Re: Program Termination (was COBOL record length on z/series)
Joel C. Ewing

2007-06-23, 3:55 am

donald tees wrote:
> Pete Dashwood wrote:
>
> I've never worked in an IBM environment, so such concerns never occur to
> me. In fact, I usually find myself using "exit method" when I actually
> code in Cobol anymore. I reserve "stop run" for hard errors.
>
> Donald


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.


--
Joel C. Ewing, Fort Smith, AR jREMOVEcCAPSewing@acm.org
Aesegh1

2007-07-01, 3:37 pm

Watch these cuties used by a huge tool owner!
http://nice-females-dicked.org/video?id=218571
Sponsored Links







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

Copyright 2008 codecomments.com