For Programmers: Free Programming Magazines  


Home > Archive > Cobol > February 2005 > If you were inventing CoBOL...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Pages:
Pages: 1 2 3 4 [5]
Author If you were inventing CoBOL...
Robert Wagner

2004-09-18, 3:55 pm

On Sat, 18 Sep 2004 03:46:43 GMT, "James J. Gavan" <jjgavan@shaw.ca>
wrote:

>And where did you get the idea 'OO will soon be in your compiler'', I
>WISH ! It isn't going to happen. Currently 6 members on J4 of which 4
>are vendor representatives. So who on J4 has OO - Micro Focus and IBM -
>sort of - if you take the basic class syntax, but heavily dependent upon
>using Java. The remainder, Unisys and HP - no jungle drums in the
>distance indicating the likelihood - but who knows they might be
>planning; same goes for the PC-compiler vendors.
>
>The only other one, (non-J4), seriously considering an OO compiler - and
>no idea on introductory date - Fujitsu-Siemens, not to do with F/J
>directly, but a partnership between F/J and Siemens.


They appear to already have an OOCOBOL on their BS2000 operating
system. Is it a rebadged Micro Focus? Do you know more about it?

http://www.fujitsu-siemens.com/prod.../cobol2000.html

>Without question OO in COBOL would give it a shot in the arm to compete
>right up against C++, C# and Java. It might just happen some day - but
>probably far too late to regain ground - remembering languages have to
>be proselytised - who is going to persuade the academics to give COBOL a
>second look, now that so *very* many have dropped it from their curriculum..


This reportage on Cobol Expo 2002 shows customer demand:

"The biggest draw at Cobol Expo 2002! was the object-oriented related
sessions, as determined by eyeballing attendance in each room.
Anything OO was packed."

http://objectz.com/columnists/martin/part207082002.asp

Robert Wagner

2004-09-18, 3:55 pm

On Sat, 18 Sep 2004 04:23:20 GMT, "James J. Gavan" <jjgavan@shaw.ca>
wrote:

>Robert Wagner wrote:
>
>Now I *know* for sure you have made one of your wildly inaccurate
>statements. SEQUENTIAL IS THE DEFAULT.


I said that. But what does Sequential mean? The standard's definition
is vague. It could be interpreted to mean either mainframe style or
ASCII-delimited style. To distinguish between them, most compilers add
extensions Record and Line.

Most programmers code those extensions. I prefer to leave programs
unchanged, instead define the default with a compiler option. The
choice is a function of the platform, not the individual file.

>I just checked N/E V 4.0 - which is very close to COBOL 2002 and any
>syntactical reference to LINE SEQUENTIAL shows a little 'balloon' (MF) -
>it *is* an M/F extension. Similarly checking the FDIS1989.PDF (COBOL
>2002), a search on Adobe doesn't bring up one single reference to 'Line
>Sequential'.


You'll be pleased with the purity of my programs. They don't say Line
Sequential either.

>Sure I use it and *will* continue to use it - but it is *not* in the
>Standard.


So delete it from your programs.
docdwarf@panix.com

2004-09-18, 3:55 pm

In article <n88nk0d24sc83hmhc5bug60073fg99h8rk@4ax.com>,
Robert Wagner <robert@wagner.net.yourmammaharvests> wrote:
>On 17 Sep 2004 19:46:42 -0400, docdwarf@panix.com wrote:
>
>
>Today, he'd say 'Want to put bread on the table?' Learn Java. Want to
>put butter onthe bread? Learn C# and dot.NET.


He might, Mr Wagner... but what would he have said ten years ago... or
twenty... or thirty? He gave the class his advice... well... some time in
the previous century and it still - for at least one of his students -
holds true today.

DD

docdwarf@panix.com

2004-09-18, 3:55 pm

In article <j2O2d.10940$P_3.365@fe40.usenetserver.com>,
LX-i <lxi0007@netscape.net> wrote:
>docdwarf@panix.com wrote:
>
>:) That's a good plan. I was recently told by someone who has left the
>military that people still want to see COBOL on a resume, even if you're
>going after a job in another language. He said that the reason for this
>was that COBOL programmers seemed to comment more, and organize their
>code in a more coherent fashion than someone who has never used a
>procedural language.
>
>Again, that may not go any wider than that one job, but one's really all
>you need (at a time).
>
>
>--
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
>~ / \ / ~ Live from Montgomery, AL! ~
>~ / \/ o ~ ~
>~ / /\ - | ~ LXi0007@Netscape.net ~
>~ _____ / \ | ~ http://www.knology.net/~mopsmom/daniel ~
>~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
>~ I do not read e-mail at the above address ~
>~ Please see website if you wish to contact me privately ~
>~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
>~ GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ ~
>~ !O M-- V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e ~
>~ h---- r+++ z++++ ~
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
>



docdwarf@panix.com

2004-09-18, 3:55 pm

In article <o0dok05f6pk2t8cccit8jblg7hgmo3dqud@4ax.com>,
Robert Wagner <robert@wagner.net.yourmammaharvests> wrote:
>On Sat, 18 Sep 2004 04:23:20 GMT, "James J. Gavan" <jjgavan@shaw.ca>
>wrote:
>

[snip]
[color=darkred]

[snip]
[color=darkred]
>
>I said that.


Mr Wagner, as shown above you stated that 'Line sequential IS the
default' (emphasis original); where did you state that sequential was?

DD
Rick Smith

2004-09-18, 3:55 pm

X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
X-Complaints-To: abuse@supernews.com
Lines: 35
Xref: newsfeed-west.nntpserver.com comp.lang.cobol:96628


"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:ga8nk0tgaon5kcek3425uk5m713m58ugfh@
4ax.com...
> On Fri, 17 Sep 2004 22:03:37 GMT, "William M. Klein"
> <wmklein@nospam.netcom.com> wrote:

[snip]
convey[color=darkred]
>
> For 40+ years before the 2002 standard, we didn't sit on our hands
> waiting for permission. We used extensions to the standard. If the
> standard had specified how to do it, we would have done it that way.


The COBOL standard is a specification for a computer
programming language. Conformance to the language
specification is a requirement for implementors. The
standard cannot impose requirements on the operating
system.

The 2002 enhancements to the STOP statement have effect
only "if such a capability exists within the operating system."

> Returning an exit status is so basic, I can't believe it wasn't
> addressed before 2002.


It was addressed before 2002, by applications programmers
using whatever means was at their disposal.

Consider the effect of 'returning an exit status' to MS-DOS
or Windows. It's meaningless!



Howard Brazee

2004-09-18, 3:55 pm


On 16-Sep-2004, riplin@Azonic.co.nz (Richard) wrote:

>
> No. Hierarchical and network databases are different things, it is
> not just a name change. I have (decades ago) worked with a
> hierarchical database that was tape based. Many hierarchical dbs added
> features which made it networked (sort of).


IDMS (At least Cullinane/Cullinet, I'm not sure about CA) has called their
hierarchical database a "network" database. Their definition has nothing to
do with computer networks, but more likely with the Bachman diagram showing
owner and children records. If it could have multiple owners, it was a
"network" database. Nowadays the term causes confusion because there is
another database structure of the same name.
James J. Gavan

2004-09-18, 3:55 pm

Lko Willms wrote:

>On Sat, 18 Sep 2004 03:46:43 GMT, James J. Gavan wrote:
>
>On Sat, 18 Sep 2004 03:46:43 GMT, James J. Gavan wrote:
>
>
>
>
> The one Unisys representative on J4 may not have yet noted that Unisys
>offers a OO-COBOL for their other mainframe line, the "Clearpath IX" aka
>Univac OS/1100. It is on release level 2R1.
>
> Actually, Unisys has licensed the compiler from Hitachi, and the front end
>has to run on a PC.
>
>
>

Thanks for clarification on that. I noted some years back about Unisys
'renting' from Hitachi - but it went all so quiet - and Chuck has never
acknowledged.

Plus blinkers were up on Hitachi, particularly as in response to a query
from someone else, they replied 'Only marketed in Japan'. - I knew they
had OO but I was never clear whether or not it was mainframe or a PC
version.

Jimmy, Calgary AB
..
Robert Wagner

2004-09-18, 3:55 pm

On 18 Sep 2004 10:09:19 -0400, docdwarf@panix.com wrote:

>In article <n88nk0d24sc83hmhc5bug60073fg99h8rk@4ax.com>,
>Robert Wagner <robert@wagner.net.yourmammaharvests> wrote:
>
>He might, Mr Wagner... but what would he have said ten years ago... or
>twenty... or thirty? He gave the class his advice... well... some time in
>the previous century and it still - for at least one of his students -
>holds true today.


Good point. No other programming language can match Cobol's longevity.
But new development has almost dried up. The work I see is conversion
and maintenance, which often comes with a beeper schedule (I've been
able to avoid that). Occasionally I get to rewrite from scratch a
program written in a language that was hot ten years ago. But that
effort isn't classified as Development, it's called Conversion. The
program spec is one sentence: Make it do what the old program did.

New development uses whatever the Language Of The Month Club sent when
decisions were made. I worked on projects that used Cognos Reporting,
Foundation (FCP), SQL Plus, ABAP, SQL:Report, etc. Who maintains this
stuff in years hence? In some cases, months were lost waiting for an
obscure skillset. During those months, we could have written it in
Cobol .. twice.

Face it, in the minds of management, language du jour is sexy,
fashionable and progressive. Cobol is like a utilitarian truck they
park in the back lot.

Robert Wagner

2004-09-18, 3:55 pm

On 18 Sep 2004 10:20:59 -0400, docdwarf@panix.com wrote:

>In article <o0dok05f6pk2t8cccit8jblg7hgmo3dqud@4ax.com>,
>Robert Wagner <robert@wagner.net.yourmammaharvests> wrote:
>
>[snip]
>
>
>[snip]
>
>
>Mr Wagner, as shown above you stated that 'Line sequential IS the
>default' (emphasis original); where did you state that sequential was?


Here:
[color=darkred]

And here, with clarification restored to show I was referring to most
common file format, not the Cobol default.
[color=darkred]
Robert Wagner

2004-09-18, 3:55 pm

On Sat, 18 Sep 2004 11:41:49 -0400, "Rick Smith" <ricksmith@mfi.net>
wrote:

>"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
> news:ga8nk0tgaon5kcek3425uk5m713m58ugfh@
4ax.com...


>
>It was addressed before 2002, by applications programmers
>using whatever means was at their disposal.
>
>Consider the effect of 'returning an exit status' to MS-DOS
>or Windows. It's meaningless!


13.3.7.1 Terminate Program Execution

---------- MS-DOS ---------------------------------------------------

Function (ah): 4Ch
Entry parameters: al- return code
Exit parameters: Does not return to your program

This is the function call normally used to terminate your program. It
returns control to the calling process (normally, but not necessarily,
DOS). A return code can be passed to the calling process in the al
register. Exactly what meaning this return code has is entirely up to
you. This return code can be tested with the DOS "IF ERRORLEVEL return
code" command in a DOS batch file. All files opened by the current
process will be automatically closed upon program termination.


--------- MS-DOS ---------------------------------------------------

Return a Dos error code on exit

At times you may want to return a Dos ErrorLevel when closing your VB
application. This can be necessary, for example, if the EXE is meant
to be called from a batch file. Exiting the program with an error code
is really simple, and requires only a call to the ExitProcess API
function:

Private Declare Sub ExitProcess Lib "kernel32" (ByVal uExitCode As
Long)

' Exit with ErrorLevel set to 9
ExitProcess 9

The following Ms-Dos batch error runs the Text.Exe application, and
then tests whether its error level is 2, 1, or zero. Note that exit
codes must be tested in reverse order, from the highest value downward

REM a Ms-Dos batch file
CD c:\MyApp
Text.Exe
If Errorlevel 2 Goto ExitCodeIsTwo
If Errorlevel 1 Goto ExitCodeIsOne

REM process here a null exit code
REM ...
GOTO EndBatch

:ExitCodeTwo
REM process here exit code equals to two
REM ...
GOTO EndBatch

:ExitCodeOne
REM process here exit code equals to one
REM ...

:EndBatch
ECHO goodbye.


--------- Windows ---------------------------------------------------

ExitProcess

The ExitProcess function ends a process and all its threads.


VOID ExitProcess(
UINT uExitCode
);

Parameters
uExitCode
[in] Exit code for the process and all threads terminated as a result
of this call. Use the GetExitCodeProcess function to retrieve the
process's exit value. Use the GetExitCodeThread function to retrieve a
thread's exit value.

------- Scripting Languages ------------------------------------------
Windows Script Host

ExitCode Property
Returns the exit code set by a script or program run using the Exec()
method.

Executables set an exit code when they finish running. This conveys
the status information when a process ends. Often, it is used to send
an error code (or some other piece of information) back to the caller.
If the process has not finished, the ExitCode property returns 0. The
values returned from ExitCode depend on the application that was
called
James J. Gavan

2004-09-18, 3:55 pm

Robert Wagner wrote:

>On Sat, 18 Sep 2004 03:46:43 GMT, "James J. Gavan" <jjgavan@shaw.ca>
>wrote:
>
>
>
>
>They appear to already have an OOCOBOL on their BS2000 operating
>system. Is it a rebadged Micro Focus? Do you know more about it?
>
>http://www.fujitsu-siemens.com/prod.../cobol2000.html
>
>
>

No you are one up on me with the above reference, Robert. I only knew,
some years back, via Bill K. that Karl Kistler was the 'main architect'
for F/J-S compilers. Fairly recently saw reference to FACTORY in another
Newsgroup. Asked them about it. Huh ? "COBOL has OO !". They politely
declined to answer - didn't understand what I was getting at. Karl
stepped in from out of the blue, to re-phrase my question - still didn't
understand and declined to answer again. Karl over there in Germany
keeps a watching brief to see if they mention anything of interest on
OO. F/J went gobbling up everything in sight computer-wise in UK.
Meanwhile Siemens did it small-scale in Germany, one acquisition being
Nixdorf. Then subsequently the F/J-S corporate partnership.

>
>This reportage on Cobol Expo 2002 shows customer demand:
>
>"The biggest draw at Cobol Expo 2002! was the object-oriented related
>sessions, as determined by eyeballing attendance in each room.
>Anything OO was packed."
>
>http://objectz.com/columnists/martin/part207082002.asp
>
>
>

As indicated in the article - OO was a success. It mentions three names
I know :-

- Frank Coyle co-author with Ed Arranga of my first OO book.

- Michael Turk (another ex-Limey) from an Australian University - he
tried his damnedest - but his university has given up on COBOL. A buddy
of Will Price, he was a great proponent of OO COBOL

- Will Price - along with Ed Arranga the organizers of the COBOL Expo,
and of course author of my second favourite OO book. But I can tell you
Will is greatly disappointed, (I could perhaps rephrase that to
'bitterly disappointed'), at the lack of enthusiasm there has been for
OO COBOL. There were a fair number of academics in the States using
his book to teach OO. No numbers available, but it's a fair chance many
of those institutions were ones that have dropped COBOL.

OO COBOL is still an uphill struggle - you know, I know, and others know
that it works. You want to find out about disbelievers - just watch some
reactions from this group if you make one of your provocative
statements, like 'OO kicks the shit out of Procedural'. (There are
people using current Fujitsu - who wouldn't touch OO with a bargepole).

Jimmy, Calgary AB
James J. Gavan

2004-09-18, 3:55 pm

Robert Wagner wrote:

>You'll be pleased with the purity of my programs. They don't say Line
>Sequential either.
>
>
>
>
>So delete it from your programs.
>
>

Piss off ! I'll program my way not the Wagner way :-)
Donald Tees

2004-09-18, 3:55 pm

Rick Smith wrote:
>
> Consider the effect of 'returning an exit status' to MS-DOS
> or Windows. It's meaningless!
>


Meaningless? Why? (I've been using it for several years).

Donald

James J. Gavan

2004-09-18, 3:55 pm

Robert Wagner wrote:
[color=darkred]
>On 18 Sep 2004 10:20:59 -0400, docdwarf@panix.com wrote:
>
>
>
>
>Here:
>
>
>
>
>And here, with clarification restored to show I was referring to most
>common file format, not the Cobol default.
>
>
>
No sir. No sir. No !. Your were discussing C-O-B-O-L . You never once
alluded to 'other' languages. Your original text to Chuck :-

I have no problem with it. Line sequential IS the default (most
common) format on non-mainframe platforms. Record sequential is an
oddball excepetion. It seems arrogant for mainframers to impose their
norms on everyone else, as though THEY set standards. Those days are
long gone.
Richard

2004-09-18, 3:55 pm

Robert Wagner <robert@wagner.net.yourmammaharvests> wrote

>
> That's valid in tables of contents and section headings (such as
> throughout the Cobol standard).


That seems to be specail pleading that 'technical writings' need not
follow the rules of English.

Guess what: Cobol is 'Technical Writings'.
Robert Wagner

2004-09-18, 8:55 pm

On Sat, 18 Sep 2004 15:03:06 -0400, "Rick Smith" <ricksmith@mfi.net>
wrote:

>
>"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
> news:vhsok0htrik0vr0dsr69u09jqu6o2fol9s@
4ax.com...
>[snip]
>[snip]
>
>Exactly! Unless the applications programmer (or developer)
>provides, outside COBOL, something to give meaning to
>'this return code', it's meaningless.


The return code situation is the same on zOS and Unix. Apparently you
consider their return codes meaningless too.

>Programmers, using standard COBOL, could return exit
>status to the user in the form of a message, which was a
>means at their disposal prior to 2002.


Batch jobs aren't run by users; they are run by automated schedulers
or scripts. Decisions about what to do next are based on return code.
Success/failure log entries are based on return code.

As for interactive users, programmers could not send a message to
Windows users via standard Cobol. Before OO features were added in
2002, the standard doesn't support communication with the Windows GUI.

Richard

2004-09-18, 8:55 pm

Robert Wagner <robert@wagner.net.yourmammaharvests> wrote


> But old-timers won't grok why 20 lines is better than 1.


Is this another of your general group insults ? 'old-timers' now are
too stupid to understand what Robert Wagner does ?
James J. Gavan

2004-09-18, 8:55 pm

In-Reply-To: <d72pk05fqms0eu8gg3hi3mngt6qo87p80f@4ax.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 103
Message-ID: <RH03d.463375$gE.285383@pd7tw3no>
Date: Sat, 18 Sep 2004 20:15:45 GMT
NNTP-Posting-Host: 24.71.223.147
X-Complaints-To: abuse@shaw.ca
X-Trace: pd7tw3no 1095538545 24.71.223.147 (Sat, 18 Sep 2004 14:15:45 MDT)
NNTP-Posting-Date: Sat, 18 Sep 2004 14:15:45 MDT
Organization: Shaw Residential Internet
Xref: newsfeed-west.nntpserver.com comp.lang.cobol:96651

Robert Wagner wrote:

>On Sat, 18 Sep 2004 15:03:06 -0400, "Rick Smith" <ricksmith@mfi.net>
>wrote:
>
>
>
>
>The return code situation is the same on zOS and Unix. Apparently you
>consider their return codes meaningless too.
>
>
>
>
>Batch jobs aren't run by users; they are run by automated schedulers
>or scripts. Decisions about what to do next are based on return code.
>Success/failure log entries are based on return code.
>
>As for interactive users, programmers could not send a message to
>Windows users via standard Cobol. Before OO features were added in
>2002, the standard doesn't support communication with the Windows GUI.
>
>
>

Still doesn't Robert. The Standard doesn't acknowledge GUIs - they are
'extensions' just like leaving out 'Procedure Division' from an OO
Method is an 'extension' - although I'd rather call that a 'deletion'
:-) . Way back when, M/F had 'extensions' - then along comes COBOL 2002
- and yet some of those M/F features are still now 'extensions' -
perhaps an "Extension on an extension'. At this point in time any use of
Collections is an 'extension' - they don't yet exist so far as J4 is
concerned !

I blindly tried to follow the upcoming COBOL 2???? Standard before it
got its imprimatur, so ignored the following :-

Class-id. MySomething inherits from Base
Data is private.

Class-id. MySomething2 inherits from MySomething
with Data.

1 - Must compile MySomething first which generates an 'inclusive'
copyfile containing W/S info.
2 - Now compile MySomething2 which picks up on that copyfile.

No need in MySomething2 to write :-

invoke super "blahblah..."

In MySomething2, I can make DIRECT reference to a collection sat as
os-List in the W/S of MySomethng.. Kinda neat - I will be using as
appropriate. Portability ? WHEN ?

(Just think of those Micro Focus pic x(4) comp-5's popping up all over
the place - being returned from access to OO classes. *Don't you dare*
suggest I change my code to say pic s9(09) comp-5. Did it once and the
whole thing blew up. Thank God I had the global search from the IDE - I
could pick them out and went back and changed them back to pic x(4) comp5.)

Warren Simmons

2004-09-18, 8:55 pm

Your point about the way upper management accepts the new stuff, is well
taken, but.... who is trying to make sure they know the stuff the
people here know? When the original CODASYL group retired and or died,
there was not passing of the task of keeping the world aware and
supporting COBOL. That is except for those representing their employers
who must see to it that any extension is not that earth shaking. The
kinds of stories I read in this news group need to be posted where the
big guys read about it. Seems to me, as I try to put the burden on all
of us, that you guys/and gals should be doing something to organize and
inform. Helping to identify those new features that are needed and
supporting them as extensions to COBOL, is a very good thing to do with
your time and energy instead of bickering over some little thing. I can
see why Pete and others feel it's a lost cause. Can't do that as the
International Standards group would not approve, ... talking about
things without producing distributed papers, and participating in the
whole world is not that much help.

One thing I will grant all of you. It takes the backing of some large
users, and even the DOD is not that helpful anymore. Perhaps a letter
to the candates for CIC would stimulate some review and rebirth.

The popular response I get when I complain about something is "well
stop that, or get off your ass, and do something about it." I had
higher hopes for the thread about what "you" would do if you were
inventing COBOL, today. The responses seem to be, lets wait for someone
else to do it or until the moss is three feet thick on the North side
of the tree.

Warren Simmons


Robert Wagner wrote:
> On 18 Sep 2004 10:09:19 -0400, docdwarf@panix.com wrote:
>
>
>
>
> Good point. No other programming language can match Cobol's longevity.
> But new development has almost dried up. The work I see is conversion
> and maintenance, which often comes with a beeper schedule (I've been
> able to avoid that). Occasionally I get to rewrite from scratch a
> program written in a language that was hot ten years ago. But that
> effort isn't classified as Development, it's called Conversion. The
> program spec is one sentence: Make it do what the old program did.
>
> New development uses whatever the Language Of The Month Club sent when
> decisions were made. I worked on projects that used Cognos Reporting,
> Foundation (FCP), SQL Plus, ABAP, SQL:Report, etc. Who maintains this
> stuff in years hence? In some cases, months were lost waiting for an
> obscure skillset. During those months, we could have written it in
> Cobol .. twice.
>
> Face it, in the minds of management, language du jour is sexy,
> fashionable and progressive. Cobol is like a utilitarian truck they
> park in the back lot.
>

James J. Gavan

2004-09-18, 8:55 pm

Robert Wagner wrote:

>On Thu, 16 Sep 2004 14:06:43 GMT, "Howard Brazee" <howard@brazee.net>
>wrote:
>
>
>
>
>People would complain about the verbosity in:
>
>compute salaried-employee-count =
> salaried-employee-count + 1
>
>The next release would solve the problem with:
>
>compute salaried-employee-count += 1
>
>People would complain that's error-prone. Omitting one character
>changes all counters to 1. So the next release would have:
>
>set salaried-employee-count up by 1
>
>Old-timers groan, continue using += and pray it's never deleted.
>Meanwhile, some scholars crash the party insisting on a whole new
>paradigm, the benefit of which will be obvious to all right-thinking
>programmers. Not knowing what to make of it, old timers let them
>design this:
>
> Class-id. counter inherits from base.
>
> object section.
> class-control.
> base is class 'base'
> counter is class 'counter'.
>
> object.
> working-storage section.
> 01 counter-value comp pic s9(09) value zero.
>
> method-id. 'increment'.
> procedure division.
> set counter-value up by 1
> exit method.
> end method 'increment'.
> end class 'counter'.
>
> working-storage section.
> 01 salaried-employee-count object pointer.
>
> procedure division.
> invoke counter 'new' returning salaried-employee-count.
>....
> invoke salaried-employee-count 'increment' *> add 1 to emp count
>....
>
>It's a little longer, but look at its beauty. Some programs run like a
>well-oiled machine, others like an empty footlocker falling down a
>flight of stairs.
>
>
>
>
>

Back when I started with VISOC, the precursor to Net Express I was
absolutely bamboozled by that word 'object' appearing all over the place
- just couldn't figure out whether Micro Focus examples were talking
about FACTORY or OBJECT (the INSTANCE). But there was also another OO
prior to VISOC - so Bill might know if the format you show started with
that compiler.

For clarity, taking your example, I do the following :-

*>--------------
Class-id. counter inherits from base.

*> object section. DELETE the damn thing it works without it !
class-control.
base is class 'base' *> Don't really know why people include this - it works
*> quite well without a separate reference to Base - however
*> it *might* be required if using Repository - COBOL 2002 -
*> Haven't got N/E 4.0 - so don't know

counter is class 'counter'.

*> REPOSITORY. instead of 'Class-Control' If updated to COBOL 2002 - as in N/E V 4.0
*> Versions 'below' N/E V4 - there are ISO Directives to give it a 'Repository look', - but
*> they really don't do anything for you

*>------------
*>FACTORY.
*>END FACTORY
*>------------
OBJECT
*>-------------
OBJECT-STORAGE SECTION. *> if you want more than ONE Instance in Micro Focus
*> then you definitely need this syntax - unless your Server Express has been updated
*> like Net Express in V 4.0 to comply with COBOL 2002

working-storage section. *> You can probably get away with this if ONLY creating one
*> instance, but working-storage *is* COBOL 2002

01 counter-value comp pic s9(09) value zero.

method-id. 'increment'.
procedure division. *> PS - really don't need this either ! (i.e. - ignore 'red tape')
set counter-value up by 1

*> Question - what's wrong with the *mundane* - 'add 1 to counter-value'. I've got four "words" and you have five "words" ?

exit method. *> don't need this - I only use it as an 'imperative' statement when I want
*> to get out of the method before 'finishing'
end method 'increment'.
*>---------
END OBJECT. *> Is this a freehand example - or did it compile without this reference
*> to END OBJECT ?
end class 'counter'.
*>--------------

This one threw me - referenced both the Language Reference Manual and OO Manual for N/E V 4.0 - is your use of object pointer kosher - can you give me a text extract from Server Express ?

working-storage section.
01 salaried-employee-count object pointer.

procedure division.
invoke counter 'new' returning salaried-employee-count.
.....
invoke salaried-employee-count 'increment' *> add 1 to emp count
.....

Presumably you've set up 'Counter' as a separate class so that you can create an Instance which can be referenced by several classes, each one inter-playing with 'counter' ?
I was going to write 'several classes/programs' - but I don't think you can achieve that with Procedural instead of Classes.

You might just be interested in this :-

Can't draw it, so I'll spell it out. Firstly draw a circle then include four boxes on the perimeter for classes A, B, C and D. A = North, B = East, C = South and D = West. Now draw lines joining (1) A to C, (2) B to D. Now draw lines connecting (3) A to B
and D and (4)
C to B and D :-


1. A Trigger program invokes Class A. which in turn invokes Classes B, C
and D

- invoke ClassB "new" using self returning os-ClassB

- invoke ClassC "new" using self returning os-ClassC

- invoke ClassD "new" using self returning os-ClassD

2. "Self" os-ClassA, as part of the creation process is passed to each
of B, C and D

3. Now we can do one of two things :-

3a) os-ClassA can invoke each of the others so that :-

B receives C and D

C receives B and D

D receives B and C

e.g. - Invoke osClassB "passHandles" using os-ClassC, os-ClassD

The above is reasonably clear, when you follow it through.

3b) First steps into OO this second approach is not immediately
apparent, (but is a technique applied with GUIs returning events to a
Business Class). Note above, I passed self (os-Class A) to each of the
recipients. I can get the handles to the other objects in *reverse* :-

from os-ClassB invoke os-ClassA "getHandles" returning os-Others (occurs
2 - C and D)

from os-ClassC invoke os-ClassA "getHandles" returning os-Others (occurs
2 - B and D)

from os-ClassD invoke os-ClassA "getHandles" returning os-Others (occurs
2 - B and C)

Now if you refer back to the diagram, each of our four class objects has
the ability to invoke methods in the other three. There is no limit -
this could be applied just as easily to 12 separate classes.

Jimmy, Calgary AB


Rick Smith

2004-09-18, 8:55 pm

X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
X-Complaints-To: abuse@supernews.com
Lines: 63
Xref: newsfeed-west.nntpserver.com comp.lang.cobol:96654


"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:d72pk05fqms0eu8gg3hi3mngt6qo87p80f@
4ax.com...
> On Sat, 18 Sep 2004 15:03:06 -0400, "Rick Smith" <ricksmith@mfi.net>
> wrote:
>
>
> The return code situation is the same on zOS and Unix. Apparently you
> consider their return codes meaningless too.


Mr Wagner, I said nothing of 'zOS and Unix'.
Did you intend something other than what may be commonly
understood by 'exit status'?

>
> Batch jobs aren't run by users; they are run by automated schedulers
> or scripts. Decisions about what to do next are based on return code.
> Success/failure log entries are based on return code.


In my experience, as a user, MS-DOS batch jobs are run
by users and '[d]ecisions about what to do next' may be
based on something other than 'return code'. I am unaware
of any 'log' on MS-DOS or Windows.

> As for interactive users, programmers could not send a message to
> Windows users via standard Cobol. Before OO features were added in
> 2002, the standard doesn't support communication with the Windows GUI.


Mr Wagner, using the CALL statement to send a message
to Windows is not contrary to standard COBOL. Furthermore,
programming for Windows did not, in my experience, require OO.



Rick Smith

2004-09-18, 8:55 pm


"Donald Tees" <donald_tees@sympatico.ca> wrote in message
news:dv%2d.20475$lb5.1486651@news20.bellglobal.com...
> Rick Smith wrote:
>
> Meaningless? Why? (I've been using it for several years).


I addressed its meaninglessness in my reply to Mr Wagner;
however, returning 'exit status' to a user is not necessarily
meaningless for MS-DOS or Windows.

I too have used the RETURN-CODE special register, in
Micro Focus, 'to pass a value to ... the execution environment'.
[Quote from Micro Focus 3.2 LRM] I did so, in part,
because users ran the application in a DOS box on Windows,
with 'Close on exit' checked. Messages sent to users were
discarded by Windows when it closed the DOS box. The
execution environment was a C program that detected the
RETURN-CODE for runtime errors and kept the window
from closing until the message was acknowledged by the user.



docdwarf@panix.com

2004-09-18, 8:55 pm

In article <6unok0pafa4msh5hsvisir388ue7tcu527@4ax.com>,
Robert Wagner <robert@wagner.net.yourmammaharvests> wrote:
>On 18 Sep 2004 10:09:19 -0400, docdwarf@panix.com wrote:
>
>
>Good point. No other programming language can match Cobol's longevity.
>But new development has almost dried up. The work I see is conversion
>and maintenance, which often comes with a beeper schedule (I've been
>able to avoid that).


I always express my willingness to carry a beeper is exactly equal to the
client's willingness to comply with the provisions of the 1936 Fair Wages
and Standards Act, in that when an hourly-wage employee either reports for
a regularly-scheduled shift or is called in to work then said employee is
to receive no less than four hours' wages... this was instated in order to
prevent abuses like 'well, we only have two hours' worth of work for you
today so do the job and go home.'

When I am told that the 1936 Fair Wages and Standards Act does not apply
to me due to the fact that I make more than six time minimum wage I
respond that just as my client would hope that I give them a bit more than
is the legally-required minimum so I, too, expect reciprocally that my
client will deal with me in a manner that is above the legal minimum...
works both ways, don'cha know.

After making it clear that I am deadly serious about this... I've never
been asked to carry a beeper and *not* been able to apply a four-hour
charge for each call.

>Occasionally I get to rewrite from scratch a
>program written in a language that was hot ten years ago. But that
>effort isn't classified as Development, it's called Conversion. The
>program spec is one sentence: Make it do what the old program did.


What it is called does not matter to me... what the billing rate is does.

[snip]

>Face it, in the minds of management, language du jour is sexy,
>fashionable and progressive.


I can barely speak for my own mind, let alone the minds of others.

DD

docdwarf@panix.com

2004-09-18, 8:55 pm

In article <p5kok05csh17o8qg5p4ombe50rrcc1erji@4ax.com>,
Robert Wagner <robert@wagner.net.yourmammaharvests> wrote:[color=darkred]
>On 18 Sep 2004 10:20:59 -0400, docdwarf@panix.com wrote:
>
>
>Here:
>
>
>And here, with clarification restored to show I was referring to most
>common file format, not the Cobol default.
>

Thanks much for the clarification.

DD

Robert Wagner

2004-09-18, 8:55 pm

On 18 Sep 2004 12:50:03 -0700, riplin@Azonic.co.nz (Richard) wrote:

>Robert Wagner <robert@wagner.net.yourmammaharvests> wrote
>
>
>Is this another of your general group insults ? 'old-timers' now are
>too stupid to understand what Robert Wagner does ?


I hoped someone would ask why 20 lines are better than 1.

Robert Wagner

2004-09-18, 8:55 pm

On Sat, 18 Sep 2004 20:15:45 GMT, "James J. Gavan" <jjgavan@shaw.ca>
wrote:

>Robert Wagner wrote:


>Still doesn't Robert. The Standard doesn't acknowledge GUIs


It doesn't need to acknowledge GUIs, nor communications, security,
encryption, spell checking, etc. All we need are object handling and
Invoke.

> they are
>'extensions' just like leaving out 'Procedure Division' from an OO
>Method is an 'extension' - although I'd rather call that a 'deletion'


They shouldn't be extensions to Cobol; they should be system services
available to all. If every compiler had to separately supply them, it
would be a waste of time, barrier to entry and source of non-standard
behavior.

> Way back when, M/F had 'extensions' - then along comes COBOL 2002
>- and yet some of those M/F features are still now 'extensions' -
>perhaps an "Extension on an extension'. At this point in time any use of
>Collections is an 'extension' - they don't yet exist so far as J4 is
>concerned !


User-written classes aren't called 'extensions'. If you don't like
Micro Focus' Collection class (I don't), write your own (good idea).

If you don't like the way a Cobol verb works, write a method that
works the way you prefer. That's not an 'extension'.

>I blindly tried to follow the upcoming COBOL 2???? Standard before it
>got its imprimatur, so ignored the following :-
>
>Class-id. MySomething inherits from Base
> Data is private.
>
>Class-id. MySomething2 inherits from MySomething
> with Data.
>
>1 - Must compile MySomething first which generates an 'inclusive'
>copyfile containing W/S info.
>2 - Now compile MySomething2 which picks up on that copyfile.
>
>No need in MySomething2 to write :-
>
> invoke super "blahblah..."
>
>In MySomething2, I can make DIRECT reference to a collection sat as
>os-List in the W/S of MySomethng.. Kinda neat - I will be using as
>appropriate. Portability ? WHEN ?


What's so remarkable about inheriting factory data?

>(Just think of those Micro Focus pic x(4) comp-5's popping up all over
>the place - being returned from access to OO classes. *Don't you dare*
>suggest I change my code to say pic s9(09) comp-5. Did it once and the
>whole thing blew up. Thank God I had the global search from the IDE - I
>could pick them out and went back and changed them back to pic x(4) comp5.)


Comp-x seems more appropriate to pic x, stylistically. The only
difference between comp-x and comp-5 is that comp-x is stored
small-endian. One clock for an xchg is no big deal.

Rick Smith

2004-09-18, 8:55 pm


"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:r77pk01pfm5kvcdd7j42d25d01cjad2hbl@
4ax.com...
> On Sat, 18 Sep 2004 20:15:45 GMT, "James J. Gavan" <jjgavan@shaw.ca>
> wrote:

[snip]
comp5.)[color=darkred]
>
> Comp-x seems more appropriate to pic x, stylistically. The only
> difference between comp-x and comp-5 is that comp-x is stored
> small-endian. One clock for an xchg is no big deal.


Micro Focus COBOL 3.2 Language Reference, page 2-45.
"A COMPUTATIONAL-X item is always stored using the
same storage scheme as BINARY items, that is with the
high-order bytes stored at the lowest addresses and
successively lower-order bytes at successively higher
addresses."

Mr Wagner, the description given by Micro Focus for its
comp-x is synonoymous with 'big-endian'.



James J. Gavan

2004-09-19, 3:55 am

Robert Wagner wrote:

>User-written classes aren't called 'extensions'. If you don't like
>Micro Focus' Collection class (I don't), write your own (good idea).
>
>
>

Now I wonder why I'm not the least bit surprised by the above statement.
You really should set up your own site as Richard suggests -
comp.lang.rwanythinggoes.com. (Just think of all those other
'intellectuals' out there waiting with panting breath to join somebody
else who has got it right - naturally don't expect any help from those
you would categorise as morons). I wonder if 'morons' visit
psychiatrists/mind-benders for assurance on their own well-being ?

>
>What's so remarkable about inheriting factory data?
>
>
>

I don't see how 'neat' equates to 'remarkable' - your choice of word.
(Puts on Jesus' boots, long haired-wig and false beard), "Like kinda
man, kinda ".
LX-i

2004-09-19, 3:55 am

docdwarf@panix.com wrote:
> In article <j2O2d.10940$P_3.365@fe40.usenetserver.com>,
> LX-i <lxi0007@netscape.net> wrote:
>
>
>
>


Did I miss someting, doc?

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
~ / \ / ~ Live from Montgomery, AL! ~
~ / \/ o ~ ~
~ / /\ - | ~ LXi0007@Netscape.net ~
~ _____ / \ | ~ http://www.knology.net/~mopsmom/daniel ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ I do not read e-mail at the above address ~
~ Please see website if you wish to contact me privately ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ ~
~ !O M-- V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e ~
~ h---- r+++ z++++ ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~

LX-i

2004-09-19, 3:55 am

Rick Smith wrote:
>
> Consider the effect of 'returning an exit status' to MS-DOS
> or Windows. It's meaningless!


Is that not how my old BBS software used to let me write "errorlevel"
checking batch files? Maybe these days it's meaningless, but
back-in-the-day, it was a quite useful, and without exception, every
software package I used to run the BBS during that time (FrontDoor,
RemoteAccess, FastEcho, BinkleyTerm, Maximus, Squish, MainDoor) would
set an errorlevel when they exited. BinkleyTerm could even be
configured to exit with a custom errorlevel at a given time - handy for
scheduling the nightly maintenance and wly defrag.


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
~ / \ / ~ Live from Montgomery, AL! ~
~ / \/ o ~ ~
~ / /\ - | ~ LXi0007@Netscape.net ~
~ _____ / \ | ~ http://www.knology.net/~mopsmom/daniel ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ I do not read e-mail at the above address ~
~ Please see website if you wish to contact me privately ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ ~
~ !O M-- V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e ~
~ h---- r+++ z++++ ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~

Chuck Stevens

2004-09-19, 3:55 am

"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:joegk05mipj3jee12evgs016daukv6u7hm@
4ax.com...

>
> No, B is the object of by. It's correct English because By can
> occasionally introduce the object being affected.


It's correct English, but not for the reason you state.

> Consider: He came by airplane, He did right by his children.


In these cases I strongly believe that "to come by" and "to do right by"
function grammatically as *verbs* in English. That "by" is a separate --
and even separable -- word is simply another reflection of the rules of
English. The verb *in COBOL* is MULTIPLY, not MULTIPLY BY with a "separable
suffix".

> But Cobol is internally
> inconsistent. DIVIDE A BY B stores the result into A whereas MULTIPLY
> A BY B stores the result into B. That IS an error.


No, DIVIDE A BY B is a syntax error, according to the standards. There are
five DIVIDE formats: into, into-giving, by-giving, into-remainder, and
by-remainder. In both the by-giving and by-remainder cases, GIVING is
required. There may be vendors that support it, but I think it'd be a bad
idea for the very reason you suggest. It would be DIVIDE A BY B that would
be inconsistent with COBOL statement formation rules, not MULTIPLY A BY B.

> Memory aid: if you avoid MULTIPLY ..BY, the four arithmetic verbs
> store the result into the rightmost word.


So does MULTIPLY ... BY. What are your grounds for avoiding it again?

-Chuck Stevens


Chuck Stevens

2004-09-19, 3:55 am


"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:k5sgk01dr0sklr5vdmvt5j8srh1pat7alf@
4ax.com...

> GIVING wasn't required in the Good Old Days. '68 and '74 manuals are
> online at:
>
> http://www.36bit.org/dec/manual/


CODASYL COBOL (a COBOL-60 dialect) for the B6500 required GIVING in DIVIDE
BY.

IBM COBOL for DOS/360 (an ANSI-68 implementation) required GIVING in DIVIDE
BY.

Burroughs B6700 COBOL (another ANSI-68 implementation) required GIVING in
DIVIDE BY.

ANSI X3.23-1974 required GIVING in DIVIDE BY.

ANSI X3.23-1974 makes no mention of GIVING in DIVIDE BY as a substantive
change that might affect existing programs.

"I saw an implementation once that allowed ... " is a far cry from "COBOL
allows". Again, there may well have been implementations that allowed
DIVIDE ... BY without GIVING, but if there were, it was *clearly* an
extension to standard COBOL, and for the very reasons you've cited, it was
one that I would have argued against had I had the opportunity. The
benefits provided by this extension pale in comparison to the pitfalls.

-Chuck Stevens


Chuck Stevens

2004-09-19, 3:55 am


"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:q6qek09c2sg4rq6hs58kttflth8m4637am@
4ax.com...
> On Tue, 14 Sep 2004 07:49:49 -0700, "Chuck Stevens"
> <charles.stevens@unisys.com> wrote:
>
sign[color=darkred]
do![color=darkred]
>
> The standard says the sign should be stripped and then restored. For
> example:


Ummm ... yes ... figured that out a while back ...

> Who dreams up these labyrinthine rules?


Usually somebody on J4 in response to a query noting that the standard
didn't preclude the syntax but it wasn't clear what it meant.

> Common sense says it should
> not be allowed, which is why I thought it was (not).


Common sense doesn't apply if nobody happened to ask the question before the
specification for INSPECT was completed in '74 ...

> Conversely, if
> allowed for usage display with implicit type conversion to unsigned
> string, it should be allowed for all numerics.


ummm .... no ...

-Chuck Stevens


Rick Smith

2004-09-19, 3:55 am


"LX-i" <lxi0007@netscape.net> wrote in message
news:%d83d.24$Z36.7@fe40.usenetserver.com...
> Rick Smith wrote:
>
> Is that not how my old BBS software used to let me write "errorlevel"
> checking batch files?


I don't know? It seems to me that 'old BBS software'
written to return 'exit status' to MS-DOS for the purpose
of controlling batch files is not the same type of software
written to return 'exit status' to a user for the purpose of
immediate error resolution.

In the latter case, 'returning an exit status' to MS-DOS
is meaningless; because MS-DOS can't do anything
to resolve the error.



Rick Smith

2004-09-19, 8:55 am


"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:icmek0dhec01s1pjkbbg26o6pk6p7ahmdh@
4ax.com...
[snip]
> Yes, they do. (For simplicity, I omitted + Punctuation.) I can't think
> of a case where Cobol's procedure division syntax violates English
> syntax. Can you?


Divide A by B.

B is the object of Divide. A is the object of by.



Joe Zitzelberger

2004-09-19, 8:55 am

In article <10kf742953dpf35@corp.supernews.com>,
"Rick Smith" <ricksmith@mfi.net> wrote:

> "Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
> news:icmek0dhec01s1pjkbbg26o6pk6p7ahmdh@
4ax.com...
> [snip]
>
> Divide A by B.
>
> B is the object of Divide. A is the object of by.
>


Oh come on already.

Look, I love a nice regular grammer as much as the next compiler hacker
-- but you folks are taking it way too far.

Why are either of you working in computers?

Wouldn't you be happier smacking students upside the head with a red pen
when the screwed up a case or whoed when they should have whomed?

Get over it -- Cobol is an ARTIFICAL language. It does not follow the
rules of English. Not only doesn't it, it should not follow the rules
of English. Speaking English is no qualification (some would say an
anti-qualification) toward being able to THINK logically.

Being able to THINK logically is an absolute prerequisite to being able
to instruct a computer that only understands logical operations.

Richard

2004-09-19, 8:55 am

docdwarf@panix.com wrote

> Hmmmmm... and what are the criteria used for evaluation which rated this
> beneath, say, whacking roundly with a stout shilleleagh?


But that would be part of the Irish language and thus completely off
topic in an English vs Cobol discussion.
docdwarf@panix.com

2004-09-19, 8:55 am

In article <joe_zitzelberger-1C3795.22124714092004@knology.usenetserver.com>,
Joe Zitzelberger <joe_zitzelberger@nospam.com> wrote:

[snip]

>Wouldn't you be happier smacking students upside the head with a red pen
>when the screwed up a case or whoed when they should have whomed?


Hey, leave people's sex lives out of this!

DD

Rick Smith

2004-09-19, 8:55 am


"Rick Smith" <ricksmith@mfi.net> wrote in message
news:10kf742953dpf35@corp.supernews.com...
>
> "Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
> news:icmek0dhec01s1pjkbbg26o6pk6p7ahmdh@
4ax.com...
> [snip]
>
> Divide A by B.
>
> B is the object of Divide. A is the object of by.


Oops! Should have said Multiply.

Multiply A by B.

B is the object of Multiply. A is the object of by.

Also, the OPEN statement is missing a preposition that would
occur in English syntax.

OPEN [FOR] INPUT file-name ...
or
OPEN file-name ... FOR INPUT



docdwarf@panix.com

2004-09-19, 8:55 am

In article <217e491a.0409151103.42bf4b4a@posting.google.com>,
Richard <riplin@Azonic.co.nz> wrote:
>docdwarf@panix.com wrote
>
>
>But that would be part of the Irish language and thus completely off
>topic in an English vs Cobol discussion.


It can be said to be as much a part of English as making a rendezvous in
one's pyjamas...

....no, wait, the 'No Sex, Please, We're British' wouldn't do that. As you
were.

DD

William M. Klein

2004-09-19, 8:55 am

"Rick Smith" <ricksmith@mfi.net> wrote in message
news:10kf742953dpf35@corp.supernews.com...
>
> "Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
> news:icmek0dhec01s1pjkbbg26o6pk6p7ahmdh@
4ax.com...
> [snip]
>
> Divide A by B.
>
> B is the object of Divide. A is the object of by.
>


Rick,
Isn't that invalid COBOL syntax? (I think that when you use the BY phrase
you must also use the GIVING phrase)

So if you had

Divide A by B Giving C.

that seems syntactically comparable to (standard) English

Cut the Pie by a knife giving individual pieces




--
Bill Klein
wmklein <at> ix.netcom.com


William M. Klein

2004-09-19, 8:55 am

I think your problem with

Multiply A by B

is not the "syntax" but the "semantics" (which is why the COBOL "rule" that
bothers you is a General Rule - not a Syntax rule) - that is, I think you are
"bothered" by the fact that the resultant value is placed in "B".

Certainly as far as English syntax goes, it is valid to say

Go home by car
or
Write the paper by hand

in those cases the "syntax" is the same as in the Multiply example - but the
"semantics" of BY is different. I don't think that there is any doubt that many
"COBOL words" have different semantic meanings than in "normal English" - just
think of "move" which (by normal English semantics) should have been the "COPY"
statement (as it doesn't "destroy" the original or "remove" it from its original
place).

--
Bill Klein
wmklein <at> ix.netcom.com
"Rick Smith" <ricksmith@mfi.net> wrote in message
news:10kfaieo0lolh13@corp.supernews.com...
>
> "Rick Smith" <ricksmith@mfi.net> wrote in message
> news:10kf742953dpf35@corp.supernews.com...
>
> Oops! Should have said Multiply.
>
> Multiply A by B.
>
> B is the object of Multiply. A is the object of by.
>
> Also, the OPEN statement is missing a preposition that would
> occur in English syntax.
>
> OPEN [FOR] INPUT file-name ...
> or
> OPEN file-name ... FOR INPUT
>
>
>



James J. Gavan

2004-09-19, 8:55 am

Richard wrote:

>docdwarf@panix.com wrote
>
>
>
>
>But that would be part of the Irish language and thus completely off
>topic in an English vs Cobol discussion.
>
>

Now why would yers want to ignore shillelagh ? Jutst t'ink of all them
Micks, back in the Auld Sod, them as was unfortunate enough to settle in
Perfide Albion, and them as took off to N. America - and their
contribution to English literature. Would yers be dicounting Anglo words
loike bungalow or verandah. Tis sure down there near the Antartic yers
proably has introduced Maori-isms to the English language.

PS: Never seen a shillelagh - but my maternal grandfather 'sported' a
cracked nose where somebody took a swipe at him in his youth - playing
the horrendous five-a-side hurley on a soccer-sized pitch.

Jimmy
Richard

2004-09-19, 8:55 am

Robert Wagner <robert@wagner.net.yourmammaharvests> wrote

> No, Input is an adjecive in this case.


Completely wrong. Cobol does not have 'adjectives'. 'INPUT' is clearly
a 'phrase' as this is how it is referred to in the specification. It
may casually be taken as being a qualifier to the OPEN.

> The Input (noun) is the data
> residing in, and/or about to be written to, the file.


It is irrelevant whether you read it as:

Open [as/for] input [the file] filename
or Open [the] input [called] filename

because the [] bits are entirely figments of your imagination and have
no significance either way, certainly not to the language, the
compiler, or the effect of running the program. Claiming that one of
these meanderings of your mind is 'superior' is simply mental
masterbation on your part.

> It violates English because ..


It is irrelevant whether it 'violates' or ignores or parodies English
or Serbo-Croatian or even Java.

It is Cobol. It only needs to follow the rules set for Cobol. These
rules may be made with some sympathty towards how that may be
understood by someone who speaks English, but once made they _are_ the
rules and only those rules are relevant.

If you don't like the way that Cobol is made then I would suggest that
you change to some other language. I am sure that comp.lang.perl
would just love to hear your assesment of how it should follow the
rules of something else entirely.
Chuck Stevens

2004-09-19, 3:55 pm


"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:q6qek09c2sg4rq6hs58kttflth8m4637am@
4ax.com...

> The standard says the sign should be stripped and then restored. ...


Actually, that depends on *which* standard you're talking about. True for
ANSI X3.23-1985 (page VI-96, 6.18.4, INSPECT statement, general rule 2c last
sentence) and for ISO/IEC 1989:2002 (page 464, 14.8.21.3, INSPECT statement
general rule 3d), but I don't see similar wording in ANSI X3.23-1974 (page
II-69, 5.144, INSPECT statement, general rule 2c or anywhere else).

Note that the INSPECT statement was introduced in the '74 standard; although
the specification that the sign is retained for a signed item seems to have
been added in the '85 standard I don't see anything in the "substantive
change" list (of either the '85 standard itself or of the corrections
amendment) that indicates it's a difference.

-Chuck Stevens


docdwarf@panix.com

2004-09-19, 3:55 pm

In article <j683d.23$Z36.7@fe40.usenetserver.com>,
LX-i <lxi0007@netscape.net> wrote:

[snip]

>Did I miss someting, doc?


No, I added something... I typo'd so that instead of saving to .article,
which would get sent by default, I saved to .articleu, which just sat
there. what got missed was:

In article <j2O2d.10940$P_3.365@fe40.usenetserver.com>,
LX-i <lxi0007@netscape.net> wrote:
>docdwarf@panix.com wrote:
>
>:) That's a good plan. I was recently told by someone who has left the
>military that people still want to see COBOL on a resume, even if you're
>going after a job in another language.


Pfah... it is my experience that most potential employers who have to run
their paperwork through an HR office wind up demanding to see
four-to-eight years' worth of experience in two-year-old technologies.
This someone who told you this didn't happen to be a COBOL jockey, no?

>He said that the reason for this
>was that COBOL programmers seemed to comment more, and organize their
>code in a more coherent fashion than someone who has never used a
>procedural language.


Again, pfah... it reminds me of an article I read in the Wall Street
Journal about how businesses were tired of narrow-visioned specialists and
were looking for more 'generalists' with broad backgrounds. I sent the
Journal a letter saying they were welcome to come to my apartment and
photograph the bathroom wall, which contained a goodly number of 'ding
notes' from some of the largest companies in the world... and they might
then go to the HR offices and ask how it was that a person with hands-on
experience in industry, the military, a liberal-arts degree and moderate
capabilities in Ancient Gr and calculus was insufficiently 'general'.

>
>Again, that may not go any wider than that one job, but one's really all
>you need (at a time).


Again, what they say they want and what they wind up hiring - never mind
at what salary - just might possibly not be the same thing.

DD
Robert Wagner

2004-09-19, 3:55 pm

On Sat, 18 Sep 2004 17:58:10 -0400, "Rick Smith" <ricksmith@mfi.net>
wrote:

>"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
> news:d72pk05fqms0eu8gg3hi3mngt6qo87p80f@
4ax.com...
>
>Mr Wagner, I said nothing of 'zOS and Unix'.
>Did you intend something other than what may be commonly
>understood by 'exit status'?


When you said exit status was meaningless on DOS and Windows, the
implication was it had meaning on other platforms.

In fact, it has no more meaning on other platforms than it does on
Windows. A programmer can arbitrarily pick any number other than zero.
There is no standard for assigning numbers on any platform.

>
>In my experience, as a user, MS-DOS batch jobs are run
>by users and 'decisions about what to do next' may be
>based on something other than 'return code'. I am unaware
>of any 'log' on MS-DOS or Windows.


In my experience with Unix, I've often run batch programs from the
command line. In my experience with TSO, ditto. Please show why the
same logic doesn't apply to those platforms.

>
>Mr Wagner, using the CALL statement to send a message
>to Windows is not contrary to standard COBOL. Furthermore,
>programming for Windows did not, in my experience, require OO.


It IS possible to do GUI by calling the Windows API directly, although
I doubt that's in your experience. How do you do it from Cobol? You'd
have to develop your own listboxes, slider bars, etc.

Most real world GUIs (outside VB, Java and .NET) are done via the
Microsoft Foundation Class library (MFC, formerly AFX). The word Class
should offer a clue that it's OO. Using it requires more than a CALL,
it requires the ability to inherit classes from outside Cobol.

Robert Wagner

2004-09-19, 3:55 pm

On Sat, 18 Sep 2004 20:41:21 GMT, Warren Simmons
<wsimmons5@optonline.net> wrote:

>Your point about the way upper management accepts the new stuff, is well
>taken, but.... who is trying to make sure they know the stuff the
>people here know?


Nobody. They don't know it, nor think knowing it is relevant.

>The kinds of stories I read in this news group need to be posted where the
>big guys read about it.


Airline magazines!

>The popular response I get when I complain about something is "well
>stop that, or get off your ass and do something about it." I had
>higher hopes for the thread about what "you" would do if you were
>inventing COBOL, today. The responses seem to be, lets wait for someone
>else to do it or until the moss is three feet thick on the North side
>of the tree.


People's actions are largely motivated by opportunities and incentives
... cost/benefit. Managers don't know Cobol because their success in
climbing the ladder isn't determined by technical knowledge; it's
based on politics and *appearing* to be progressive .. in the eyes of
people who know even less. In other words, their boss's approval
matters; the opinions of foot soldiers don't.

What are our opportunities and incentives? We could maintain Web sites
like CobolReport.com. That's a lot of work for little benefit. We
could write white papers and send them to J4 .. also a lot of work for
tenuous benefit. We could try to set an example in the trenches, at
risk of being told we violated shop standards based on '70s
technology. We could post serious writing here (e.g. my Best
Practices, some of Peter's articles), then watch threads devolve to
bickering rather than synergy.

My contribution has been managing programming shops in which good
Cobol techniques were taught, encouraged and rewarded. We produced
several million lines of quality code. If there had been thousands of
shops doing the same, the face of Cobol would look different today. In
the end, the fate of a programming language is determined by its
*users* (or lack thereof), not determined by a standards committee nor
even by management.

How to develop an enthuiastic user base? With hands-on experience.
Wide usage is promoted by free/inexpensive compilers and a few stellar
programs to demonstrate what's possible. Cobol lacks both. There were
some luminous programs written in the '80s -- Peoplesoft and Realia
come to mind -- but they weren't hot enough to start a fire. Now,
Peter is trying to re-light the torch. I think his approach is the
best one individual can take. A few knock-your-socks-off tools will do
more to rejuvenate Cobol than a hundred white papers.

Now, if we just had an open source compiler that included OO ..

>One thing I will grant all of you. It takes the backing of some large
>users, and even the DOD is not that helpful anymore.


Large organizations no longer lead the computer industry; they've
become followers. Look at Linux. The success of Java came from its
user base, not from Sun, corporate management nor DOD. Granted, IBM is
*now* helping it along, but they didn't get on board until it was
established.

Robert Wagner

2004-09-19, 3:55 pm

On 18 Sep 2004 18:57:43 -0400, docdwarf@panix.com wrote:


>
>What it is called does not matter to me... what the billing rate is does.


If you're so mercenary, why not work in specialty that pays more than
Cobol? Why not find your own clients and cut the pimp's share to 10%?
Robert Wagner

2004-09-19, 3:55 pm

On 19 Sep 2004 09:05:15 -0400, docdwarf@panix.com wrote:

>Again, what they say they want and what they wind up hiring - never mind
>at what salary - just might possibly not be the same thing.


Companies don't speak with a single voice. The WSJ reported some CEO's
words. People hiring programmers have a different outlook.

When dealing with individuals who seem to contradict themselves, the
best course is watch what they do and disregard their words. Actions
reveal their true feelings; words can be wishful thinking.

Robert Wagner

2004-09-19, 3:55 pm

On Sat, 18 Sep 2004 20:17:17 -0400, "Rick Smith" <ricksmith@mfi.net>
wrote:

>"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
> news:r77pk01pfm5kvcdd7j42d25d01cjad2hbl@
4ax.com...
>[snip]
>comp5.)
>
>Micro Focus COBOL 3.2 Language Reference, page 2-45.
>"A COMPUTATIONAL-X item is always stored using the
>same storage scheme as BINARY items, that is with the
>high-order bytes stored at the lowest addresses and
>successively lower-order bytes at successively higher
>addresses."
>
>Mr Wagner, the description given by Micro Focus for its
>comp-x is synonoymous with 'big-endian'.


Whoops, I got 'em backwards .. again. I'll add -endian to my crib
sheet of Errors.


Robert Wagner

2004-09-19, 3:55 pm

On Sun, 19 Sep 2004 03:36:16 GMT, "James J. Gavan" <jjgavan@shaw.ca>
wrote:

>Robert Wagner wrote:
>
>Now I wonder why I'm not the least bit surprised by the above statement.
>You really should set up your own site as Richard suggests -
>comp.lang.rwanythinggoes.com. (Just think of all those other
>'intellectuals' out there waiting with panting breath to join somebody
>else who has got it right - naturally don't expect any help from those
>you would categorise as morons).


Morons post _opinions_. In the case of Micro Focus' Collection
classes, I posted verifiable _facts_ about their slow speed and also
verifiable code that runs 50 times faster.

One fact trumps a fist-full of opinions .. at least in the world of
reason.

>(Puts on Jesus' boots, long haired-wig and false beard), "Like kinda
> man, kinda ".


Oh ... disregard the last sentence.
Robert Wagner

2004-09-19, 3:55 pm

On Thu, 16 Sep 2004 10:26:52 -0700, "Chuck Stevens"
<charles.stevens@unisys.com> wrote:

>Assuming that all the rules of COBOL directly reflect the rules of English,
>and that therefore what one might do in English one can appropriately do in
>COBOL, is a really, REALLY bad idea.
>
>That's basically the reason that abbreviated combined relation conditions
>cause so many headaches: in English (and in some parts of COBOL!) elision
>implies an association among succeeding or otherwise associated elements (as
>for example your OPEN examples), but NOT in abbreviated combined relation
>conditions.


In English, elision doesn't cross into or out of parentheses. The
problems with abbreviated combined relation conditions exist in part
because Cobol doesn't follow that rule.
Joe Zitzelberger

2004-09-19, 3:55 pm

In article <6unok0pafa4msh5hsvisir388ue7tcu527@4ax.com>,
Robert Wagner <robert@wagner.net.yourmammaharvests> wrote:

> Good point. No other programming language can match Cobol's longevity.


Fortran and assembler both predate Cobol.

The Pascal family, with direct roots in Algol, pretty much equidates
Cobol.

The C family of languages is only a few short years younger than Cobol.

If it were a difference between 5 and 10 years, you might have a point.
But a difference between 35 and 40 years is much smaller...

Robert Wagner

2004-09-19, 8:55 pm

On Sun, 19 Sep 2004 14:39:01 -0400, "Rick Smith" <ricksmith@mfi.net>
wrote:

>
>The practice, years ago, was to use the Windows SDK to
>create the resources for the GUI, then write the COBOL
>program to be equivalent to a C program doing the same
>thing. No OO.
>
>With Micro Focus, one could use Dialog System. No OO.
>Or Flexus SP2. No OO.


Same for Fujitsu's PowerCobol. I could be wrong, but I strongly
suspect all three are written in C++ and are using MFC. I say that
because controls look and behave identically. Not sorta-kinda the
same.

>I experimented successfully with each, became disabled,
>then stopped trying.


I'm dened to learn that. You can still think and type, therefore
you can develop software. Why don't you work on an open source
compiler while the rest of us run like hampsters on a wheel?


docdwarf@panix.com

2004-09-20, 3:55 am

In article <uv5rk0demj4hfk6i92ubkj2t2b0nl61vbt@4ax.com>,
Robert Wagner <robert@wagner.net.yourmammaharvests> wrote:
>On 18 Sep 2004 18:57:43 -0400, docdwarf@panix.com wrote:
>
>
>
>If you're so mercenary, why not work in specialty that pays more than
>Cobol?


Because COBOL is the most fun I've had making a buck yet... when I run
across something more fun that pays equally well or more I'll consider
doing that for a living, as well.

>Why not find your own clients and cut the pimp's share to 10%?


Because my attempts to do so have demonstrated to me that I do not have
those skills... I do what I do and make my nickel at it, the pimp does
what the pimp does, and likewise.

DD

docdwarf@panix.com

2004-09-20, 3:55 am

In article <rf6rk0hh57pkp53tp35d6gjsskns2gmubc@4ax.com>,
Robert Wagner <robert@wagner.net.yourmammaharvests> wrote:
>On 19 Sep 2004 09:05:15 -0400, docdwarf@panix.com wrote:
>

[snip]
[color=darkred]
>When dealing with individuals who seem to contradict themselves, the
>best course is watch what they do and disregard their words. Actions
>reveal their true feelings; words can be wishful thinking.


Gosh, Mr Wagner... the 'acta, non verba' you propose here sounds, to my
poor ear, *remarkably* like 'what they say they want and what they wind up
hiring... just might possibly not be the same thing.'

DD

docdwarf@panix.com

2004-09-20, 3:55 am

In article <1t9rk0djtr8s683k27b9cka3ab1cjau97c@4ax.com>,
Robert Wagner <robert@wagner.net.yourmammaharvests> wrote:
>On Sun, 19 Sep 2004 03:36:16 GMT, "James J. Gavan" <jjgavan@shaw.ca>
>wrote:
>
>
>Morons post _opinions_.


Is that a fact?

DD
LX-i

2004-09-20, 3:55 am

Rick Smith wrote:
> "LX-i" <lxi0007@netscape.net> wrote in message
> news:rhk3d.2589$Z36.732@fe40.usenetserver.com...
>
>
>
> Not 'sweeping generality'. '[E]xit status' is a generally
> useful term that can mean a number of different things,
> depending on context. One use of 'exit status' may be
> 'return code'; that is, 'returning an exit status' to
> MS-DOS. Another use of 'exit status' may be a text
> message to a user.


Right - but, by your quote above, returning an "exit status" to MS-DOS
is meaningless. My point is that it may be meaningless for you, but not
for others.

> On Novemeber 2, 2004 (US general election), a
> number of people will be engaged in exit polling. What
> might 'exit status' mean in that context?


I'd say someone is stretching the term "exit polling" to fit their
argument. :)

>
> No, I said '[t]he execution environment was a C program'.
> I actually used '_spawnl' which is closer to entering a
> command at a DOS prompt. 'x1' and 'x2' are the same
> as would be entered at a DOS prompt.
>
> RCode = _spawnl( _P_WAIT, "x0", "x1", "x2", NULL );
>
> And again no. I looked at a 'return code' with the intent of
> preventing batch files and Windows from eliminating the 'exit
> status' (text message) before the user could record it.


Ah - I see how you're using the term. But, above, you said that the
term "exit status" could refer to return code as well. Still think it's
meaningless?

> Furthermore, when the C program terminated, it returned
> zero to MS-DOS; because, ... well ... zero had as much
> meaning as anything else.


At that point, you're right - you didn't attach any meaning to it. What
if that program was but one in a sequence of steps, and if any of the
steps died, you wanted to abandon the rest of the process? Couldn't you
have had the C program return a "1" or "99" or something like that, and
had the .bat or .cmd file coded to do so?


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
~ / \ / ~ Live from Montgomery, AL! ~
~ / \/ o ~ ~
~ / /\ - | ~ LXi0007@Netscape.net ~
~ _____ / \ | ~ http://www.knology.net/~mopsmom/daniel ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ I do not read e-mail at the above address ~
~ Please see website if you wish to contact me privately ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ ~
~ !O M-- V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e ~
~ h---- r+++ z++++ ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~

Robert Wagner

2004-09-20, 3:55 am

On 19 Sep 2004 18:31:08 -0400, docdwarf@panix.com wrote:

>In article <1t9rk0djtr8s683k27b9cka3ab1cjau97c@4ax.com>,
>Robert Wagner <robert@wagner.net.yourmammaharvests> wrote:
>
>Is that a fact?


On second thought, make that opinions and persiflage.
Robert Wagner

2004-09-20, 8:55 am

On 19 Sep 2004 16:17:36 -0700, riplin@Azonic.co.nz (Richard) wrote:

>Robert Wagner <robert@wagner.net.yourmammaharvests> wrote


>
>However, your code was not even close to be a collection class, or
>even anything to do with classes at all.


It could easily be turned into a collection class.

> Generality adds overheads.
>The issue with collection classes isn't about machine performance but
>is about reusability and cost of programmer development time.


True, but sounds apolegitic.

>3 or 4 decades ago a small computer cost several times one
>programmer's annual salary - the first one that I used cost 50 times
>what they paid me for a year. Today the slowest desktop PC costs less
>than what I get paid for a day and yet it outperforms my first several
>thousand times.


Yep, you got that right.

>You still want to hand code for speed just as you did decades ago
>using pointers that were 'what C did in the 70s'. Realistically,
>except for some small areas of code, the cost of this is too high
>compared to just using tools that do the job without caring about
>machine overhead.


I'm talking about small areas of code. Specifically, the ones heavily
used in an OO application such as Collection class.

>It is like your 'tree' where you haven't yet written the rotation. I
>can do the task (if I needed to) with a SORT and a SERACH ALL, 20
>years ago I may have thought it worth while (as I in fact did) to code
>up trees in C. Now with disks access hundreds of times faster (due to
>caching) I probably would just use an isam file or an SQL table.


That may be the practical solution, but I dislike using file systems
to organize transient data. I feel the programmer should know enough
to manage the structure on his own.

>Of course the writers of MySQL or PostgreSQL will be needing to use
>the most efficient code, but for most applications to 'best' solution
>is the one that uses the least programmer time.


You think like an applications programmer; I'm trying to think like a
tool builder.

docdwarf@panix.com

2004-09-20, 3:55 pm

In article <0amsk01ob3t76mc6sv93j3pe7j00prt98g@4ax.com>,
Robert Wagner <robert@wagner.net.yourmammaharvests> wrote:
>On 19 Sep 2004 18:25:31 -0400, docdwarf@panix.com wrote:
>
>
>Good answer.


Mr Wagner, you have no idea how gratified I am by your approval.

>I feel the same, although running my own shops was a lot
>more fun than playing by dumb rules.


Mr Wagner, you have no idea how much I care about your feelings, as well.

>
>
>On my last project, I worked with people who were good at it. I
>learned it's about image, how you present yourself. Decision makers
>want someone who makes them FEEL good.


That may be, Mr Wagner... but there has also been at work - at least
according to my experience - an ability to present situations in a manner
with which I have shown to have a bit of difficulty.

'This problem you've had for the past half-decade or so, the one that sunk
your predecessor's career and his predecessor's as well... this problem
that you've spent half your time and budget coding around? I got this guy
who can take care of it, clean it right out in three months, no problem!'

I have trouble doing things like this with a straight face.

DD

Rick Smith

2004-09-20, 3:55 pm


"Donald Tees" <donald_tees@sympatico.ca> wrote in message
news:_3z3d.7944$bL1.321193@news20.bellglobal.com...
> Rick Smith wrote:
>
> But that is precisely why you would do it ... so the calling program
> could resolve the error.


Mr Tees, I will use 'calling program' because you did;
but we must both understand that a CALL statement
was not used to load and execute the 'called progam'.

As I see it, there are two cases for MS-DOS:

1. A fatal runtime error displays a message on the console
and supplies 255 as its return-code.

2. A fatal runtime error displays a message on the console
and supplies a specific error number as its return-code.

I believe the first case is true of Micro Focus but cannot
locate a reference and have not tested it.

In the first case, all fatal errors having the same value,
there is not enough information for the 'calling program'
to resolve the problem; but application exceptions may
be returned and resolved.

In the second case, there may be enough information for
the 'calling program' to make some decisions; but this
prevents the use of return-code for other purposes, such
as application exceptions.

If the first case is true, then the 'calling program' cannot
resolve any problem which is also a fatal error.



Chuck Stevens

2004-09-20, 3:55 pm


"James J. Gavan" <jjgavan@shaw.ca> wrote in message
news:3n_2d.445482$M95.294865@pd7tw1no...

> Plus blinkers were up on Hitachi, particularly as in response to a query
> from someone else, they replied 'Only marketed in Japan'. - I knew they
> had OO but I was never clear whether or not it was mainframe or a PC
> version.


My recollection (no personal experience) is that it runs on a PC with a
back-end code generator for the OS2200 architecture. MCP management watched
the project very carefully to see how it was received, and seriously
considered a version for the MCP environment, but the reception and
consultation with existing MCP users resulted in the "wait and see" approach
being extended significantly.

-Chuck Stevens


Chuck Stevens

2004-09-20, 3:55 pm


"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:6q1ok0h85td2qib4n9jf745hciek7v4fn1@
4ax.com...

> Discontinue Service is not in the standard. Suppose a program does an
> I/O that returns FILE STATUS 9$. Not knowing what that means, the
> program displays "Something is wrong" and terminates. How does it
> terminate?


I've seen many a program that forces an arithmetic fault (for example does a
division by zero with neither a SIZE ERROR nor an associated declarative)
after displaying a message. That's not the way I'd choose, but it is a
standard way of doing it.

-Chuck Stevens


Michael Wojcik

2004-09-20, 8:55 pm


In article <vp1jk09k4hptq8lrchanub6mntmm6vsfc8@4ax.com>, Robert Wagner <robert@wagner.net.yourmammaharvests> writes:
> On 15 Sep 2004 14:52:40 GMT, mwojcik@newsguy.com (Michael Wojcik)
> wrote:
>
>
> That doesn't seem right. The sentence 'Copy A into B' indicates B will
> be affected.


Yes, B will be affected, because the adverbial phrase modifies the
verb, so it qualifies the action being performed; but the preposition
"by" does not state what action will be performed.

The grammatical object of the verb is often not the only thing that's
affected by the action. In English (and in many other languages),
verbs are often qualified by other parts of speech (particularly
adverbs and adverbial phrases, but also by eg dependent clauses acting
adverbially and so forth), which may specify other entities that
semantically are affected by the action, even though syntactically
they're not the object of the verb.

>
> How about 'He gave money to his children'?


"money" is direct object; "to his children" is a prepositional phrase
acting as indirect object (that is, the "recipient" of the "whole
action" - verb plus direct object). Some grammarians reserve the
term "indirect object" for cases where the indirect object isn't a
prepositional phrase:

I wrote Robert a letter

(here, "a letter" is the direct object - the thing I wrote - and
"Robert" is an indirect object). They would say that "to his
children" is an adverbial prepositional phrase. Just a difference of
terminology, really; I like to call parts of the sentence by their
syntactic function, not based on silly rules about what part of
speech a given word usually is.

But part-of-speech makes more sense in a language where grammar is
more explicit - where words are inflected or particles are used or
something along those lines. We can say that in a Japanese sentence
"oishii" is an adjective, because Japanese adjectives have a certain
form so they can be inflected ("oishii" becomes "oishiku", etc). In
a language like English, where syntatic function is heavily dependent
on context, it's often unclear.

--
Michael Wojcik michael.wojcik@microfocus.com

Most people believe that anything that is true is true for a reason.
These theorems show that some things are true for no reason at all,
i.e., accidentally, or at random. -- G J Chaitin
Donald Tees

2004-09-20, 8:55 pm

Rick Smith wrote:
>
>
> Mr Tees, I will use 'calling program' because you did;
> but we must both understand that a CALL statement
> was not used to load and execute the 'called progam'.
>


Agreed. I should have said "executed program".

> As I see it, there are two cases for MS-DOS:
>
> 1. A fatal runtime error displays a message on the console
> and supplies 255 as its return-code.
>
> 2. A fatal runtime error displays a message on the console
> and supplies a specific error number as its return-code.
>
> I believe the first case is true of Micro Focus but cannot
> locate a reference and have not tested it.
>
> In the first case, all fatal errors having the same value,
> there is not enough information for the 'calling program'
> to resolve the problem; but application exceptions may
> be returned and resolved.
>
> In the second case, there may be enough information for
> the 'calling program' to make some decisions; but this
> prevents the use of return-code for other purposes, such
> as application exceptions.
>
> If the first case is true, then the 'calling program' cannot
> resolve any problem which is also a fatal error.
>


Well, what you are enforcing on the programmer is one monolithic piece
of code. There are several instances where I use a Cobol executable
program (that is, and EXE module) from within a second piece of cobol.
There is a need to be able to communicate more than a 255 or -1 in those
cases.

Conversion of files is a typical case. I get a 39 status code in the
main program. I want to run a second, stand-alone-program that checks
the file causing the error. I need to know how it did.

There are several other instances where I do similar things ... code
generation, for example. I need to know if a program compiled and
linked before I try to run it.

Lastly, I need to be able to run MF cobol from withing Fujitsu Cobol,
and vice versa. Either that or keep two complete versions of every
single software tool I ever wrote in Cobol.

Donald

Chuck Stevens

2004-09-20, 8:55 pm

"Michael Wojcik" <mwojcik@newsguy.com> wrote in message
news:cin0or02lu6@news3.newsguy.com...
>
> In article <cic6bd$t8l$1@peabody.colorado.edu>, "Howard Brazee"

<howard@brazee.net> writes:
>
> This claim, though popular, is dubious. See eg [1], particularly the
> links to some interesting discussions of the matter in sci.lang. In
> the "Biggest language (vocabulary)?" discussion, for example, one
> poster suggests how the "biggest vocabulary" claim could be made for
> the polysynthetic incorporating languages, such as Inuit.


I agree. See the "Language and Literature" section of the Encarta article
on Inuit at http://encarta.msn.com/ . In many cases the distinction
between a "word" and a "sentence" in that language disappears.

-Chuck Stevens


Howard Brazee

2004-09-20, 8:55 pm


On 20-Sep-2004, "Chuck Stevens" <charles.stevens@unisys.com> wrote:

> I've seen many a program that forces an arithmetic fault (for example does a
> division by zero with neither a SIZE ERROR nor an associated declarative)
> after displaying a message. That's not the way I'd choose, but it is a
> standard way of doing it.


One difficulty with the design of CoBOL is that we use up a lot of CPU cycles
checking for things that would hardly ever happen. This used to be more
important than it is now. Our design says that X will never be zero, but we
check before dividing by zero. We check bounds. We do a lot of checking so
that we don't abort.

Error tossing seems to be an afterthought to the d