Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Old style

Status
Not open for further replies.
Sep 9, 2002
3
0
0
US
Just out of curiosity,
how many of you have seen the Alter statement
in a Cobol program? It was considered archaic
years ago. The funny fact is that I've been coding
in a OOP language that uses a similar contruct
that allow branching to a variable --

ie branch &variableA where &variableA is variable
that can be modified within the code.

Steve Lucas
 
I've seen ALTER in my earlier days (mid 70's). When we developed our programming standards, we outlawed its use. Then in the mid 80's we started using a 4th gl for coding and they had a feature like you mentioned and everybody thought it was the greatest thing. I guess because it wasn't COBOL it was considered innovative.
 
I believe the ALTER statement was removed from the COBOL specs. when COBOL-85 came along.

This type of construct is considered bad form in any language, like using goto's.

Just because a 4th gl or OOP language has it, doesn't mean it's good nor innovative.

It may be just an opinion but it's MY opinion.

 
I used ALTER quite a bit in the 60's. It made for very efficient code, and with the names I used, it was easy to follow. However, I quit using it because I saw how others abused it and made incredibly convoluted code. Then when I learned structured coding in the 70's, I quit using GO TO altogether. With the advent of COBOL-85, programming good structures got even easier.

The original CICS (MACRO Level) required the use of GO TO. Then IBM came out with Command-Level CICS, and that was the end of GO TO for me.

Any construct in any lanquage can be abused. ALTER was just one of the easiest to do so.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top