I have once again come up with an improvement of a previous tip. This time it is about the tip from week 10/2008 where I described how to redirect the output to SYSOUT. Meanwhile I have discovered a compiler option where you can specify the the DD name to which the output from the DISPLAY statement should be sent to. The default for this option is of course SYSOUT.
How to specify compiler options in the program source I have described in week 52/2009. You should use a PROCESS OUTDD(MYDDNAME) and replace MYDDNAME with the DD name you prefer to use. Processing of this DD name is exactly the same as for SYSOUT. The specification of OUTDD is on source program level. If your main program specifies OUTDD(CBLMAIN) and your sub program specifies OUTDD(CBLSUB), then a DISPLAY in the main program is sent to CBLMAIN while a DISPLAY in the sub program is sent to CBLSUB. Output from DISPLAY in CICS programs is still sent to CEEOUT regardless of what you specify in OUTDD.
If you use DD name SYSPRINT which is the default for the PL/I PUT statement and you mix COBOL DISPLAY and PL/I PUT during execution, you cannot rely on the order in which output is presented, because COBOL and PL/I used different buffering techniques. I will recommend you to take a closer look into this subject if you are planning any serious mixing of output from PL/I and COBOL in the same program execution.