Thanks Mark

This pgm will eventually be moved to prod. I don't think I can get any lib in front of QSYS - its too high up. And wouldn't that mess up other jobs??

But I really like your idea & creativity!

So there is no CL command to ignore specific messages?

I think that all the msgs from the OPM cobol program are msg-id LBE7606

Can I do something like a simple MONMSG LBE7606 and do nothing with it? Although its seems that msgs still get written to the job log - I tried that idea.

Is there a similar method with one CL command in a CL pgm that will ignore msgs similar to OVRDBF?

Thanks!!

-----Original Message-----
From: COBOL400-L [mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mark S Waterbury
Sent: Tuesday, January 17, 2017 11:47 AM
To: cobol400-l@xxxxxxxxxxxx
Subject: Re: [COBOL400-L] Any simple method of ignoring "Display" commands in a Cobol pgm?

Joel:

I wrote a small OPM COBOL/400 program with a DISPLAY statement to
reproduce this, compiled it, and called it, and then placed the cursor
on the message that appeared on my interactive screen and pressed
F1=Help, then F9=Message details, and there I saw the name of the
program that sent this message was QSYS/QLRADRTN ... So, I issued:

DSPPGM QSYS/QLRADRTN

and paging down reveals that this program has just one parameter.

So, next, I wrote this little CL program, also named QLRADRTN:

/* COBOL/400 runtime routine to ignore DISPLAY statements */
/* Nota bene: must be placed in a library ahead of QSYS */

PGM PARM(&MSG)
DCL VAR(&MSG) TYPE(*CHAR) LEN(255)
RETURN
ENDPGM

I compiled it into a test library and added that library to my session
*LIBL ahead of QSYS, by issuing:

CHGSYSLIBL TESTLIB1 *ADD

(/NOTE: you may need to get a sys. admin. to grant you access to use
the CHGSYSLIBL//command.)/

Then, I called my little test COBOL program with the DISPLAY statement
again, and nothing showed up this time.

Hope that helps,

Mark S. Waterbury

On 1/17/2017 12:24 PM, Stone, Joel wrote:
Working on an OPM COBOL prod pgm, that has many DISPLAY commands that write messages to the job log.

Is there a CL command that will inhibit the writing of these messages?

For testing, it slows down the time dramatically.

I know I can wrap IF statements around the dozens of display statements. Is there a simpler way in CL?

Something like:

OVRDBF FILE(X) INHWRT(*NO)
But for COBOL display messages?


Thanks!



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.