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?
From: COBOL400-L [mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mark S Waterbury
Sent: Tuesday, January 17, 2017 11:47 AM
Subject: Re: [COBOL400-L] Any simple method of ignoring "Display" commands in a Cobol pgm?
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:
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 */
DCL VAR(&MSG) TYPE(*CHAR) LEN(255)
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
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?
OVRDBF FILE(X) INHWRT(*NO)
But for COBOL display messages?
As an Amazon Associate we earn from qualifying purchases.