× 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.



cobol400-l-request@xxxxxxxxxxxx wrote:

   1.  SYSOUT vs. QPRINT for debug-type information...
      (Michael Rosinger)

Another ILE/COBOL newbie question. I was running a test program where I was issuing a lot of DISPLAY UPON SYSOUT messages for debug purposes. The job was cancelled by the system because "the size of the message queue for job xxx reached the maximum size". I see from the output that in addition to the lines I was interested in seeing there were lots of system-generated stuff that I did not care about.

Other posts have hit most point related to this. I just wanted to bring elements together in a single place.

Your DISPLAY statement results in a message being sent to your job's message queue. The size of job message queues is controlled in order to limit runaways; pretty standard stuff there.

Control is done on general size at the system level by two system values -- QJOBMSGQFL and QJOBMSGQMX. Those values can be overridden for any particular job by job attributes from the job description, from the SBMJOB command or, in the case of QJOBMSGQFL, from a CHGJOB command.

Further control can be done with the LOG() parameter of SBMJOB or CHGJOB or the LOG() attribute of the associated job description. This can be used to limit _which_ messages make it into the job message queue. Selection is done by message levels and severities.

By having a large job message queue size and only allowing your DISPLAY messages into the job message queue, you can manage to create a _very_ long list of messages, tens of thousands easily.

And by specifying "*PRTWRAP" to be the action that happens when that message queue gets full, you can flush the message queue out to a spooled file many times in a job. Each flushed 'segment' can have the tens of thousands of messages, and there could be thousands of segments. Total count of DISPLAY messages can be in the millions pretty quickly.

When the message queue segment is flushed, the amount of detail that is set to be printed per message is also controlled by LOG(). That is specified by the 'Text' portion of LOG(). If all you want to see is the message text itself, then specify LOG(n n *MSG). [Where 'n n' is the message level followed by severity that you want.]

IOW, you have a whole bunch of control and the control can be achieved at various levels. The control can be at a system default level; it can be for the set of jobs that use a particular job description; it can be for an individual job that you submit with SBMJOB; or it can be done dynamically within the job itself via CHGJOB. The CHGJOB command can also be run by you from a command-line against your batch job as many times as you want to change the attributes while your job runs.

Lots of choice and reasonably easy to exercise any choice. (The full set of choices actually goes farther.) Of course, you can also shoot yourself in the foot if you hit a loop that won't end and you've overridden the controls...

Tom Liotta


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.