Re: pattern for an error
- From: "William M. Klein" <wmklein@xxxxxxxxxxxxxxxxx>
- Date: Wed, 28 May 2008 22:09:45 GMT
To use product names (rather than the PGM= name from JCL).
For the "MVS" environment (including OS/390, z/OS - but not VSE),
Any compiler from VS COBOL II, R1 and later will allow END-IF. (VS COBOL II,
R1, R1.2, and R2 were '74 Standard compilers. VS COBOL II R3.0 and later
support eh '85 Standard). They also support - as an extension - NEXT SENTENCE
in an IF that ends with END-IF. Support for END-xxxx syntax is available even
when CMPR2 is used to emulate a '74 Standard compiler - sort-of.
Any compiler from OS/VS COBOL or earlier will NOT support END-IF (or any other
END-xxxx syntax).
***
Most (but certainly NOT ALL) code with
GO TO NNN-PARA-NAME-EXIT
syntax in it (especially if coded in all CAPS) was PROBABLY originally coded for
OS/VS COBOL or someone who was trained on OS/VS COBOL (or earlier). If that
is/was the case, then you will NOT see
GO TO NNN-PARA-NAME-EXIT
In an IF statement that is terminated by END-IF. If you see the combination of
that type of GO TO (especially in CAPS and END-IF), the changes are medium-good
that you are looking at code that has been maintained (in the last 20 years) but
never really "upgraded" to current coding techniques.
All of this is VAST generalizations and many exceptions do exist (on IBM
mainframes and elsewhere).
--
Bill Klein
wmklein <at> ix.netcom.com
"Howard Brazee" <howard@xxxxxxxxxx> wrote in message
news:9v9r34li5gfth17dttv7mu7f62587uv7el@xxxxxxxxxx
On Wed, 28 May 2008 17:36:48 +0000 (UTC), docdwarf@xxxxxxxxx () wrote:
IF FILE-STATUS-OK
CONTINUE
ELSE
GO TO BAD-FILE-STATUS
END-IF.
Wait a moment... how did IKFCBL00 compile that?
I don't know what IKFCBL00 is, but my IBM compiler will compile it.
But the people who code with Go To are also the people who don't use
END-IF.
.
- Follow-Ups:
- Re: pattern for an error
- From:
- Re: pattern for an error
- References:
- pattern for an error
- From: mario
- Re: pattern for an error
- From: Howard Brazee
- Re: pattern for an error
- From: Michael Mattias
- Re: pattern for an error
- From: Howard Brazee
- Re: pattern for an error
- From:
- Re: pattern for an error
- From: Howard Brazee
- pattern for an error
- Prev by Date: Re: pattern for an error
- Next by Date: Re: mySQL
- Previous by thread: Re: pattern for an error
- Next by thread: Re: pattern for an error
- Index(es):
Relevant Pages
|