Re: Help! GO TO and PERFORM THRU!
- From: "HeyBub" <heybubNOSPAM@xxxxxxxxx>
- Date: Sat, 24 Feb 2007 16:58:51 -0600
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.
Lucky you!
If your shop standard mandates PERFORM THRU and GO TOs, you'll always have a
job.
.
- References:
- Help! GO TO and PERFORM THRU!
- From: Impy
- Help! GO TO and PERFORM THRU!
- Prev by Date: Re: Help! GO TO and PERFORM THRU!
- Next by Date: Re: Help! GO TO and PERFORM THRU!
- Previous by thread: Re: Help! GO TO and PERFORM THRU!
- Next by thread: Re: Help! GO TO and PERFORM THRU!
- Index(es):
Relevant Pages
|