From: Anonymous on
In article <1c7t745vngs713ons088l4cu3ndps98op7(a)4ax.com>,
Robert <no(a)e.mail> wrote:
>On Wed, 16 Jul 2008 09:39:30 +0000 (UTC), docdwarf(a)panix.com () wrote:
>
>>In article <pupq74t94srcr2ps97vc6qikc24he4gq1u(a)4ax.com>,
>>Robert <no(a)e.mail> wrote:
>>
>>[snip]
>>
>>>Two spaces is a useful way to delimit strings lacking a length, as in
>>>Frank's case
>>>
>>>STRING 'SQL error in ' SQL-ERRLOC ' -- Consult documentation. '
>>> DELMITED BY ' ' *> literal is two spaces
>>> INTO ERROR-MSG
>>>
>>>Nervous programmers don't trust that technique out of fear the string
>>>might contain two
>>>spaces typed in by a user.
>>
>>Inexperienced programmers may never never had a Corner Office Idiot come
>>to their desks, slam down a Manhattan telephone-directory-sized (Yellow
>>Pages, containing the business listings) and yowl about how error messages
>>are getting mangled, truncated or distorted, either.
>>
>>>OK, how about ten spaces?
>>>
>>>STRING 'SQL error in ' SQL-ERRLOC ' -- Consult documentation. '
>>> DELMITED BY ' ' *> literal is 10 spaces
>>> INTO ERROR-MSG
>>
>>Inexperienced programmers may never have had a Corener Office Idiot summon
>>them to receive a command to change the wording or composition of an error
>>message under certain conditions (varying commodities prices, mid-day
>>temperatures, number of birds on a window-ledge), complete with line-wrap
>>and mixed-case formatting, and sent on their way with 'The email software
>>does this all the time, there shouldn't be a problem... all ya gotta do is
>>what they're doing'.
>>
>>>
>>>They would rather feed the Cobol reputation for verbosity with this:
>>>
>>>MOVE 60 TO SQL-ERRLOC-LEN
>>>MOVE ZERO TO TEMP
>>>INSPECT FUNCTION REVERSED(SQL-ERRLOC) TALLYING TEMP FOR LEADING SPACE
>>>SUBTRACT TEMP FROM SQL-ERRLOC-LEN
>>>MOVE SPACES TO ERROR-MSG
>>>STRING 'SQL error in ' SQL-ERRLOC ' -- Consult documentation. ' INTO ERROR-MSG
>>
>>I've never met a programmer who has professed a desire to do 'feed the
>>Cobol reputation for verbosity', Mr Wagner... but I have, in my time, run
>>across UseNet posters who has seemed to desire to impute motives to others
>>so as to bolster an argument which degrades said others' abilities,
>>efforts, approaches or solutions.
>
>You denigrate the manager by calling him a Corner Office Idiot.

To describe accurately, Mr Wagner, is not to denigrate. Are you syaing
your experience is so limited you've never met such a person?

>In the
>next sentence you
>say contracting is about doing the bidding of the one who signs your
>timecard, usually the
>same manager.

'He who pays the piper calls the tune' is a sentiment which pre-dates
computer programming by a few years, Mr Wagner. Are you saying your
experience is so limited you've never been exposed to it?

>Further, you imply that those who disagree should be
>stripped of their
>templates and drummed out of the contracting corps.

'Implication is in the mind of the beholder', Mr Wagner; try to address
what I wrote, not what you'd like to believe I have written. Have you
seen many pornographic inkblots recently?

>
>The situation you describe is a special form of dilemma.

What I've described, Mr Wagner, is in my experience nothing special at
all; it gives a rationale for a practise you disagree with that does not
involve incompetence on the part of coders or a slavish devotion to the
status quo ante, two horses I've seen flogged a few times in your postings
here... perhaps almost as often as others have seen Corner Office Idiots
described in my own postings, I've not counted.

DD

From: Howard Brazee on
On Wed, 16 Jul 2008 18:30:26 -0600, "Frank Swarbrick"
<Frank.Swarbrick(a)efirstbank.com> wrote:

>I guess I am one of those 'nervous programmers'. If only Cobol had
>"DELIMITED BY TRAILING SPACES" or some such thing.

I've found that I have moved away from one of the basics of CoBOL,
preferring to use reference modification to wordy commands. Do we
need DELIMITED BY TRAILING SPACES or TRIM to be clear? I think that
may be overkill, reference modification loops aren't hard to
understand.
From: Robert on
On Thu, 17 Jul 2008 09:25:52 +0000 (UTC), docdwarf(a)panix.com () wrote:

>In article <1c7t745vngs713ons088l4cu3ndps98op7(a)4ax.com>,
>Robert <no(a)e.mail> wrote:
>>On Wed, 16 Jul 2008 09:39:30 +0000 (UTC), docdwarf(a)panix.com () wrote:
>>
>>>In article <pupq74t94srcr2ps97vc6qikc24he4gq1u(a)4ax.com>,
>>>Robert <no(a)e.mail> wrote:
>>>
>>>[snip]
>>>
>>>>Two spaces is a useful way to delimit strings lacking a length, as in
>>>>Frank's case
>>>>
>>>>STRING 'SQL error in ' SQL-ERRLOC ' -- Consult documentation. '
>>>> DELMITED BY ' ' *> literal is two spaces
>>>> INTO ERROR-MSG
>>>>
>>>>Nervous programmers don't trust that technique out of fear the string
>>>>might contain two
>>>>spaces typed in by a user.
>>>
>>>Inexperienced programmers may never never had a Corner Office Idiot come
>>>to their desks, slam down a Manhattan telephone-directory-sized (Yellow
>>>Pages, containing the business listings) and yowl about how error messages
>>>are getting mangled, truncated or distorted, either.
>>>
>>>>OK, how about ten spaces?
>>>>
>>>>STRING 'SQL error in ' SQL-ERRLOC ' -- Consult documentation. '
>>>> DELMITED BY ' ' *> literal is 10 spaces
>>>> INTO ERROR-MSG
>>>
>>>Inexperienced programmers may never have had a Corener Office Idiot summon
>>>them to receive a command to change the wording or composition of an error
>>>message under certain conditions (varying commodities prices, mid-day
>>>temperatures, number of birds on a window-ledge), complete with line-wrap
>>>and mixed-case formatting, and sent on their way with 'The email software
>>>does this all the time, there shouldn't be a problem... all ya gotta do is
>>>what they're doing'.
>>>
>>>>
>>>>They would rather feed the Cobol reputation for verbosity with this:
>>>>
>>>>MOVE 60 TO SQL-ERRLOC-LEN
>>>>MOVE ZERO TO TEMP
>>>>INSPECT FUNCTION REVERSED(SQL-ERRLOC) TALLYING TEMP FOR LEADING SPACE
>>>>SUBTRACT TEMP FROM SQL-ERRLOC-LEN
>>>>MOVE SPACES TO ERROR-MSG
>>>>STRING 'SQL error in ' SQL-ERRLOC ' -- Consult documentation. ' INTO ERROR-MSG
>>>
>>>I've never met a programmer who has professed a desire to do 'feed the
>>>Cobol reputation for verbosity', Mr Wagner... but I have, in my time, run
>>>across UseNet posters who has seemed to desire to impute motives to others
>>>so as to bolster an argument which degrades said others' abilities,
>>>efforts, approaches or solutions.
>>
>>You denigrate the manager by calling him a Corner Office Idiot.
>
>To describe accurately, Mr Wagner, is not to denigrate. Are you syaing
>your experience is so limited you've never met such a person?

There are several management types. The worst is a former programmer Peter Principled into
a corner office. For him, time stopped when he last wrote code. If he had trouble with,
say complex conditionals or the sort verb, those features will be verboten until he
retires. The shop will be stuck with old technology so long as he's there.

Managers like that are found in medium sized companies. They don't survive in large
companies like the ones where I perfer to work.

>>In the
>>next sentence you
>>say contracting is about doing the bidding of the one who signs your
>>timecard, usually the
>>same manager.
>
>'He who pays the piper calls the tune' is a sentiment which pre-dates
>computer programming by a few years, Mr Wagner. Are you saying your
>experience is so limited you've never been exposed to it?

I heard it often in Asian bars. Unlike IT contractors, whores set limits on how low
they'll go. They have more dignity.

>>Further, you imply that those who disagree should be
>>stripped of their
>>templates and drummed out of the contracting corps.
>
>'Implication is in the mind of the beholder', Mr Wagner; try to address
>what I wrote, not what you'd like to believe I have written. Have you
>seen many pornographic inkblots recently?

No, but just this morning I saw a repulsive GO TO DEPENDING ON. Fortunately, my stomach
was empty.

>>The situation you describe is a special form of dilemma.
>
>What I've described, Mr Wagner, is in my experience nothing special at
>all; it gives a rationale for a practise you disagree with that does not
>involve incompetence on the part of coders or a slavish devotion to the
>status quo ante, two horses I've seen flogged a few times in your postings
>here... perhaps almost as often as others have seen Corner Office Idiots
>described in my own postings, I've not counted.
>
>DD

From: Anonymous on
In article <civu74lqq4tvr0d57gaf4gnens1ummp9mu(a)4ax.com>,
Robert <no(a)e.mail> wrote:
>On Thu, 17 Jul 2008 09:25:52 +0000 (UTC), docdwarf(a)panix.com () wrote:
>
>>In article <1c7t745vngs713ons088l4cu3ndps98op7(a)4ax.com>,
>>Robert <no(a)e.mail> wrote:
>>>On Wed, 16 Jul 2008 09:39:30 +0000 (UTC), docdwarf(a)panix.com () wrote:
>>>
>>>>In article <pupq74t94srcr2ps97vc6qikc24he4gq1u(a)4ax.com>,
>>>>Robert <no(a)e.mail> wrote:
>>>>
>>>>[snip]
>>>>
>>>>>Two spaces is a useful way to delimit strings lacking a length, as in
>>>>>Frank's case
>>>>>
>>>>>STRING 'SQL error in ' SQL-ERRLOC ' -- Consult documentation. '
>>>>> DELMITED BY ' ' *> literal is two spaces
>>>>> INTO ERROR-MSG
>>>>>
>>>>>Nervous programmers don't trust that technique out of fear the string
>>>>>might contain two
>>>>>spaces typed in by a user.
>>>>
>>>>Inexperienced programmers may never never had a Corner Office Idiot come
>>>>to their desks, slam down a Manhattan telephone-directory-sized (Yellow
>>>>Pages, containing the business listings) and yowl about how error messages
>>>>are getting mangled, truncated or distorted, either.
>>>>
>>>>>OK, how about ten spaces?
>>>>>
>>>>>STRING 'SQL error in ' SQL-ERRLOC ' -- Consult documentation. '
>>>>> DELMITED BY ' ' *> literal is 10 spaces
>>>>> INTO ERROR-MSG
>>>>
>>>>Inexperienced programmers may never have had a Corener Office Idiot summon
>>>>them to receive a command to change the wording or composition of an error
>>>>message under certain conditions (varying commodities prices, mid-day
>>>>temperatures, number of birds on a window-ledge), complete with line-wrap
>>>>and mixed-case formatting, and sent on their way with 'The email software
>>>>does this all the time, there shouldn't be a problem... all ya gotta do is
>>>>what they're doing'.
>>>>
>>>>>
>>>>>They would rather feed the Cobol reputation for verbosity with this:
>>>>>
>>>>>MOVE 60 TO SQL-ERRLOC-LEN
>>>>>MOVE ZERO TO TEMP
>>>>>INSPECT FUNCTION REVERSED(SQL-ERRLOC) TALLYING TEMP FOR LEADING SPACE
>>>>>SUBTRACT TEMP FROM SQL-ERRLOC-LEN
>>>>>MOVE SPACES TO ERROR-MSG
>>>>>STRING 'SQL error in ' SQL-ERRLOC ' -- Consult documentation. ' INTO ERROR-MSG
>>>>
>>>>I've never met a programmer who has professed a desire to do 'feed the
>>>>Cobol reputation for verbosity', Mr Wagner... but I have, in my time, run
>>>>across UseNet posters who has seemed to desire to impute motives to others
>>>>so as to bolster an argument which degrades said others' abilities,
>>>>efforts, approaches or solutions.
>>>
>>>You denigrate the manager by calling him a Corner Office Idiot.
>>
>>To describe accurately, Mr Wagner, is not to denigrate. Are you syaing
>>your experience is so limited you've never met such a person?
>
>There are several management types. The worst is a former programmer
>Peter Principled into
>a corner office. For him, time stopped when he last wrote code. If he
>had trouble with,
>say complex conditionals or the sort verb, those features will be
>verboten until he
>retires. The shop will be stuck with old technology so long as he's there.
>
>Managers like that are found in medium sized companies. They don't
>survive in large
>companies like the ones where I perfer to work.

The question posed to you, Mr Wagner, was not about management types or
where you prefer to work; you were asked if your experience encompassed
meeting a kind of person. You did not say that you had.

>
>>>In the next sentence you
>>>say contracting is about doing the bidding of the one who signs your
>>>timecard, usually the same manager.
>>
>>'He who pays the piper calls the tune' is a sentiment which pre-dates
>>computer programming by a few years, Mr Wagner. Are you saying your
>>experience is so limited you've never been exposed to it?
>
>I heard it often in Asian bars. Unlike IT contractors, whores set limits
>on how low
>they'll go. They have more dignity.

You were not asked about your what you frequently hear in Asian bars, Mr
Wagner, you were asked about your exposure to a sentiment. You did not
say you had been exposed to it.

>
>>>Further, you imply that those who disagree should be
>>>stripped of their
>>>templates and drummed out of the contracting corps.
>>
>>'Implication is in the mind of the beholder', Mr Wagner; try to address
>>what I wrote, not what you'd like to believe I have written. Have you
>>seen many pornographic inkblots recently?
>
>No, but just this morning I saw a repulsive GO TO DEPENDING ON.

With a little more experience and exposure, Mr Wagner, it might be that
you'll get to see one that is not repulsive. Until such time it might be
wise to insure that a better-experienced, better-exposed programmer is
available to deal with code.

DD

From: Frank Swarbrick on
>>> On 7/16/2008 at 11:21 PM, in message
<epjt74dastquiojsap46u6vlk72b0o0704(a)4ax.com>, Robert<no(a)e.mail> wrote:
> On Wed, 16 Jul 2008 18:30:26 -0600, "Frank Swarbrick"
> <Frank.Swarbrick(a)efirstbank.com>
> wrote:
>
>>>>> On 7/15/2008 at 10:19 PM, in message
>><pupq74t94srcr2ps97vc6qikc24he4gq1u(a)4ax.com>, Robert<no(a)e.mail> wrote:
>
>>> STRING 'SQL error in ' SQL-ERRLOC ' -- Consult documentation. '
>>> DELMITED BY ' ' *> literal is 10 spaces
>>> INTO ERROR-MSG
>>
>>I guess I am one of those 'nervous programmers'. If only Cobol had
>>"DELIMITED BY TRAILING SPACES" or some such thing.
>
> Good point. The standards committee dropped the ball, then tried to
> recover by adding
> TRIM() to the 2008 spec.
>
> AcuCobol does have TRAILING SPACES.
>
>>> A way to trim left spaces with a single statement is
>>>
>>> UNSTRING sloppy-word DELIMITED BY ALL SPACE INTO trimmed trimmed
>>>
>>> If it doesn't have a leading space, the first mention of trimmed is the

>>> destination. If it
>>> does have leading spaces, they go into the first mention of trimmed,
>>> only to be
>>> overwritten by the word going into the second mention of trimmed.
>>
>>How about trimming right spaces?
>
> MOVE ZEROS TO SQL-ERRLOC-LEN
> INSPECT ERRLOC TALLYING SQL-ERRLOC-LEN FOR CHARACTERS BEFORE INITIAL '

> '
>
> Not much better than ten spaces on STRING.
>
>>The best would be the proposed TRIM instrinsic function:
>>STRING 'SQL error in '
>> FUNCTION TRIM(SQL-ERRLOC)
>> ' -- Consult documentation.'
>> DELIMITED BY SIZE
>> INTO ERROR-MSG
>>
>>OpenCobol supports it! But VSE won't in my lifetime. Ah well!
>
> Can't you write user-defined functions in VSE Cobol?

If you mean "FUNCTION-ID. TRIM." then no, you cannot. Cobol VSE supports
only the 1985 standard with the 1989 addenda, and nothing newer.

Frank