If you want just the Display information in a separate print file that is
similar to the mainframe you will need to add the qprint file to your
program as suggested before. Or the information you are looking for is in
the job log for you job. I wrote a CL program to retrieved the message from
the *PGMQ message queue. This CL runs after every COBOL program and reads
thru the message queue and looks for the specific LNR message for the
DISPLAY out. (LNR7607 LNR7606). Once I find a LNR message I just pass it to
a COBOL program that write the record to a QPRINT output file. Here is the
CL source. 
             DCL        VAR(&MSGTEXT) TYPE(*CHAR) LEN(132)         
             DCL        VAR(&MSGDATA) TYPE(*CHAR) LEN(132)         
             DCL        VAR(&MSGID) TYPE(*CHAR) LEN(7)             
                          RMV(*NO) MSG(&MSGTEXT) MSGDTA(&MSGDATA) +
             IF         COND(&MSGID *EQ '       ') THEN(GOTO +     
             IF         COND(&MSGID *EQ 'LNR7606' *OR &MSGID *EQ + 
                          'LNR7607') THEN(DO)                      
             CALL       PGM(DMPDISPLAY) PARM(&MSGTEXT)             
             GOTO       CMDLBL(LOOP)                               
 ENDPGM:     endpgm                                                

Here is the gist of the DMPDISPLAY COBOL program. I write all of the
messages to a file in qtemp and then I can print the file with all of the
display output from the COBOL program.  

LINKAGE SECTION.                       
01  Msg-Text             PIC X(132).   
    Open Extend Print-File.            
    initialize Print-Record.           
    move Msg-Text to Print-Rec.        
    write Print-Record.                
    close Print-File.                  

Jerry Thomas
Cothern Computer Systems, Inc. 

-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx
[mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of Michael Rosinger
Sent: Wednesday, December 13, 2006 5:18 AM
To: cobol400-l@xxxxxxxxxxxx
Subject: [COBOL400-L] SYSOUT vs. QPRINT for debug-type information...


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.

In the mainframe world, we are used to using a lot of DISPLAY UPON SYSLST 
(if need be) and they just get routed to a different spooled entry which is 
separate from any of the other reports the program may generate. It's 
readily accessible if you happen to need it to verify a problem and easily 
discarded if you don't.

So, in the iSeries world, what is the "acceptable" way to create printed 
output for debug and tracking purposes? Coding a DISPLAY UPON SYSOUT is, of 
course, easier than defining and writing to a print file, but it's not a big

deal if that is what must be done.

Your suggestions please? TIA

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