Re: Trying to use STRING
- From: docdwarf@xxxxxxxxx ()
- Date: Mon, 19 Mar 2007 13:01:08 +0000 (UTC)
In article <1174297445.146281.315510@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
razor <iruddock@xxxxxxxxxxxxxxxx> wrote:
Wow
I'm beginning to wonder what I started here.
It might be that you started... a UseNet thread. Such things may have
curious ways of winding hither and yon, I've seen.
Since I posted the
original question I've completed the work, program is live and a
cheque is on the way to my address. That will do me.
This is why many folks are in business... as has been said before,
'nothing is certain until the check clears the bank'. Congratulations on
having done a job your client considers worth paying for.
In addition, the style of coding I have used is very similar to the
other 600+ programs I have to maintain. I think this is more important
to me. Knowing that all of the programs do similar tasks in the same
way makes it very easy to remember each program. This to me seems more
important than adopting a newer or 'better' (according to who?) way of
doing things.
Ow OW Ow ow ow ow... here there is a problem. On the one hand, the system
must work, on the other hand... I've found that what I call 'the best and
the brightest' occaisonally show an aversion to performing the same task
in the same manner at all times. Consider the conflicting aphorisms of:
The old rut is the best rut.
The public is always attracted to the next nine-day's wonder.
[snip]
Working on my own I can make these decisions myself which is a great
freedom. I certainly do not miss working in an environment where
somebody deems 'nested ifs' or EXIT constructs to be unsuitable for
any reason and bans their use. Next minute you are in an annual review
and somebody is armed with a piece of your code (that is working of
course) and wants to beat you down with it.
Hmmmmm... you'd better not let Mr Dashwood hear such sentiments, you might
wind up being accused of 'negativity'. Let me see... ahhh, there it is,
gotta love this Web-thingie; exactly eight years ago this date some
COBOL-codin' fool posted (as documented by
<http://groups.google.com/group/comp.lang.rexx/msg/29d1b77320d7bfc7?dmode=source>
--begin quoted text:
Other may prefer programming languages with more modern
constructs.
Others may, sure... but let them *try* to get some code past a review and
implemented into Prod!
'What is *this* stuff? EVALUATE TRUE WHEN cond-1 imperative statement...
you call this COBOL?!?'
'Oh, please, Mr Standards-and-Practises Reviewmeister, it is exactly what
is allowed by the ANSI '85 Standard.'
'ANSI '85? Crap, I *knew* things were goin' ta hell in a handbasket when
we allowed them fancy ANSI '74 constructs in a couple a' years back...
look, 1985 is only 14 years ago, we oughta wait until the technology is
Really Proven before we implement it. Go back and rewrite this in *real*
COBOL, then try again.'
--end quoted text
From the posts here the one piece of code I did like was the INSPECTstatement to get the first non-space character. Very simple and I
should use it, BUT none of the other programs use it and so I begin to
move away. Hmmm, needs consideration.
The Olde Wisdome used the 'two-year programmer' benchmark; if something
may reasonably be expected to be within the worldview of a programmer with
two years' worth of experience then it is permitted. I would say that all
Intro-to-COBOL textbooks I have seen include use of INSPECT; based
on my experience, then, it is reasonable to conclude that COBOL
programmers with two years' worth of experience would have, as part of
their worldview, familiarity with material covered in an Intro-to-COBOL
textbook.
(I have, of course, at times been surprised and disappointed in this
expectation... Such is Life.)
[snip]
The comment about using WS-SUB not as a subscript is just silly. I use
WS-SUB(1/2/3/4) as very local fields to do various things and not
necessarily as a subscript. And as all of the programs do the same,
its easy :-).
'Easy' is in the mind of the beholder, perhaps. To you it may be easier
to read:
PERFORM (stuff unique to FLD1) VARYING SUB1 FROM 1 BY 1 UNTIL...
MOVE SUB1 TO (counter unique to FLD1).
PERFORM (stuff unique to FLD2) VARYING SUB1 FROM 1 BY 1 UNTIL...
MOVE SUB1 TO (counter unique to FLD2).
.... while my eyes, for whatever they might be worth, see redundancy that
can be eliminated by coding
PERFORM (stuff unique to FLD1) VARYING (counter unique to FLD1)...
PERFORM (stuff unique to FLD2) VARYING (counter unique to FLD2)...
DD
.
- References:
- Trying to use STRING
- From: razor
- Re: Trying to use STRING
- From: HeyBub
- Re: Trying to use STRING
- From: Charles Hottel
- Re: Trying to use STRING
- From: razor
- Trying to use STRING
- Prev by Date: Re: US - TX - Need Mainframe Data Architect in Iowa
- Next by Date: Re: The Lambda lambada...Why embedded SQL is becoming irrelevant and why you should start looking at functional programming.
- Previous by thread: Re: Trying to use STRING
- Next by thread: Re: Trying to use STRING
- Index(es):
Relevant Pages
|
Loading