× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Yes I agree the dozens of DISPLAY commands in a production program is over the top.

However the guy who wrote the pgm is still working here, and he still uses them, and he hasn't removed them, so I didn't feel that it was my place.

Hes an old-schooler, still only uses PDM and OPM-only Cobol (never ILE) so I find it much easier to "go with the flow" :)





-----Original Message-----
From: COBOL400-L [mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of MichaelQuigley@xxxxxxxxxx
Sent: Thursday, January 19, 2017 8:41 PM
To: cobol400-l@xxxxxxxxxxxx
Subject: Re: [COBOL400-L] Any simple method of ignoring "Display" commands in a Cobol pgm?

"COBOL400-L" <cobol400-l-bounces@xxxxxxxxxxxx> wrote on 01/19/2017
01:00:22 PM:
----- Message from "Stone, Joel" <Joel.Stone@xxxxxxxxxx> on Thu, 19
Jan 2017 15:55:13 +0000 -----

To:

"COBOL Programming on the IBM i (AS/400 and iSeries)" <cobol400-
l@xxxxxxxxxxxx>

Subject:

Re: [COBOL400-L] Any simple method of ignoring "Display" commands in
a Cobol pgm?

Wow that's an excellent idea!!

The IF/END-IF aren't so bad by themselves, but placed into already
deeply nested condition statements, READ INVALID KEY statements,
EVALUATEs, etc, that will make it a lot easier to maintain and read.

Also it will be far less likely that I will introduce my own bugs.

Thanks for the tip!

Joel



-----Original Message-----
From: COBOL400-L [mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of
G.
Sent: Wednesday, January 18, 2017 10:05 PM
To: COBOL Programming on the IBM i (AS/400 and iSeries) <cobol400-
l@xxxxxxxxxxxx>
Subject: Re: [COBOL400-L] Any simple method of ignoring "Display"
commands in a Cobol pgm?

On Wed, 18 Jan 2017 20:54:59 +0000, you wrote:

The only reason I wanted to do this is because the DISPLAY
commandseems to
significantly slow down the execution of a large batch run.
I will resolve by conditioning the DISPLAY statements (IF...END-IF) to
not
execute during a prod run, that will be doable. But there are 100+ of
them
for whatever reason???

What about conditioning all those DISPLAY statements with a D in column
7 so
that they get executed only when in COBOL debug mode (see STRCBLDBG)?

Indeed an excellent suggestion if the statements genuinely serve a purpose
in development mode. Just don't forget to code the with debugging mode on
the source-computer paragraph.

This does also raise the question, is there any use to these statements at
all? If not, you could also simply delete them. I never use the debugging
mode because I debug in RDi. I can see more and don't have to recompile or
run in a special environment--i.e., STRCBLDBG.

Michael Quigley
Computer Services
The Way International
www.TheWay.org

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.