McKown, John wrote:
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Steve Comstock
Sent: Thursday, December 27, 2007 12:01 PM
To: [email protected]
Subject: Re: Controlling COBOL DDs named SYSOUT


<snip>

Huh? What have you got against judicious use of DISPLAY
so that you want to call the programmer an idiot?


Judicious use is, barely, tolerable to me (see below). About all that I
consider to be judicious is the writing of "statistics" such as "records
read", "records deleted", "records updated", "new records written",
although I've never noticed anybody actually using that information for
anything.

I agree with you on that.



The OP said there were debugging / development time
DISPLAY statements left behind in code that should
have been removed before moving to production. Hal's
suggestion has solid merit (or is that Merritt) behind
it.

DISPLAY is useful even in production, for certain
error detection / correction routines. And it's the
simplest way to generate HTML in a COBOL CGI.

So you would not consider the above uses "judicious"?



 Of
course, you could require only calls to CEEMOUT or
CEEMSG for this kind of work, to enforce a no-DISPLAY
-in-production philosophy, but I don't think that's
an improvement.



Kind regards,


I guess after the 30th time that some nit-wit of a programmer (granted
that they are few in number) used up 35% of my SPOOL, I got just a bit
"down" on use of the DISPLAY verb. Especially when it was putting out
"debugging" information about entering and exitting paragraphs, while
reading a 30 million record master file. Anything that can be done with
the DISPLAY can be done using the "normal" COBOL I/O verbs. So far as I
am concerned, if it is a report, then use an FD!

I absolutely agree with that.

It's just that DISPLAY
is so simple that, in my experience, it can be greatly abused. And if it
is a report, I unsure which is more CPU efficient: an FD with a WRITE or
a DISPLAY ... UPON SYSOUT.

Using DISPLAY to generate a report is very inefficient
relative to using an FD and OPEN, CLOSE, and WRITE verbs.
(Unless, of course, you OPEN-WRITE-CLOSE for every record!)
You can't believe the number of COBOL training courses that
use DISPLAY and ACCEPT to get programmers writing complete
programs quickly. This may be one reason many COBOL
programmers use this approach: it's the first one they
see. We eschew that approach in our courses. Even though
the student can't produce a complete program until the
third lab, we are adamant that the student learn the
correct way to work with files. We don't even introduce
DISPLAY until the fourth day of the intro class.


[snip]

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

  z/OS Application development made easier
    * Our classes include
       + How things work
       + Programming examples with realistic applications
       + Starter / skeleton code
       + Complete working programs
       + Useful utilities and subroutines
       + Tips and techniques

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to