Help! GO TO and PERFORM THRU!



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: 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: Relevance of languages WAS: Re: Date Validation in COBOL
    ... Very good response from both you and Howard. ... COBOL replacing Assembler was one ... programming to the masses was a very bad move and there would have ... because COBOL controls everything and is not designed for responding ...
    (comp.lang.cobol)
  • 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)
  • Cobol and OO programming: the final chapter!
    ... The history of Cobol today is often modeled as an evolution in steps ... reflection of the OO programming influence, ... ideological fight for pimp standards has basically already been fought ... must assume it does give us the fittest ideology for the times. ...
    (comp.lang.cobol)
  • Layers, objects, and granularity
    ... working with classes and objects in COBOL and ... from the input and output and replace them with an interface. ... Presentation layer, Business layer, and Data access ... Leaving aside the debate about OO programming versus Procedural programming, ...
    (comp.lang.cobol)