Re: Help! GO TO and PERFORM THRU!



Top Post:

Solving problems in code is an opportunity for elegance & simplicity.

These two constructs are inelegant and show lack of appreciation of good design.

They're old hat: shabby old hat.

Best avoided unless your job depends on it.

Write code so that some day, perhaps, someone could enjoy reading it.

Regards

Michael

Impy wrote:
Okay, so I have been doing the Cobol thing for a couple of months now,
Unisys, DMS2, datasets, batch, BOLTS screens, etc. and quite enjoying
it. However, it appears our S&P manual states we are to use GO TOs,
and my fellow Cobol programmers use them, as well as the PERFORM THRU
statements.

Okay, they use them pretty cleanly I'd say. PERFORM A100-READ-FILE
THRU A100-READ-FILE-EXIT, etc. and the GO TOs are only used to loop
through reads and writes and such, and to go to the exit paragraphs
upon errors, or maybe in a nested loop to go back to an earlier loop.

It's not exactly spaghetti code (or is it?) , and it's 'the way it's
done' where I work, so I'm just following orders. This is my first
programming job, went back to school in my 30's, been toying with
programming since 7th grade, having lots of fun too.

So, if you are going to use PERFORM THRU and GO TO this seems a
halfway decent way of using them. But I believe I have some choice in
how I proceed in writing my code, S & P manual may be out of date, but
I haven't really discussed this much with anyone.

I have been reading much trashing of PERFORM THRU and GO TO this
morning, and I'm just curious what opinions people have. Obviously, I
will do things the way my company wants them done, but I will have
some flexibility in future programs, so I'd like to start thinking
about it now.

Thanks
Impy

.



Relevant Pages

  • Re: Help! GO TO and PERFORM THRU!
    ... However, it appears our S&P manual states we are to use GO TOs, ... or maybe in a nested loop to go back to an earlier loop. ... programming since 7th grade, ...
    (comp.lang.cobol)
  • Re: Help! GO TO and PERFORM THRU!
    ... However, it appears our S&P manual states we are to use GO TOs, ... or maybe in a nested loop to go back to an earlier loop. ... programming since 7th grade, ...
    (comp.lang.cobol)
  • Re: Brian Kernighan, maybe Im not worthy, maybe Im scum
    ... and just hone in on the stuff related to programming and this newsroup] ... moron that was taken from optimization which does hoist when to do so ... compiler design and optimization, including my 1976 text in graduate ... loop in a language in which the designers messed up, ...
    (comp.programming)
  • Re: what does "serialization" mean?
    ... language programming and found that my productivity increased to the ... the use of an expression in the For loop is not only ... acceptable it's good style because it forces the reader to understand. ... If the reader doesn't understand the language he must get ...
    (comp.programming)
  • Re: what does "serialization" mean?
    ... the "how" of assembler languages to the "what" of functional and logic ... > As a general programming heuristic, ... For line is inside the loop and one's style should not perpetuate ... one problem is that the concept of "iterator" doesn't ...
    (comp.programming)