Skip to main content

When the main Cobol program calls a Cobol sub-program, the DISPLAY statements from the main program appear in the job's SYSOUT, but not the sub-program's DISPLAY messages.

Problem:

When using Enterprise Server JCL and the main Cobol program calls a Cobol sub-program, the DISPLAY statements from the main program appear in the job's SYSOUT, but not the sub-program's DISPLAY messages. Why is this?

Resolution:

The reason this is happening is because the main program was compiled using a mainframe dialect, while the sub-program was compiled using the Micro Focus dialect. Simply add the compiler directive OUTDD"SYSOUT 121 R" and the sub-program DISPLAYs will appear in the SYSOUT.

Old KB# 13974

#netexpress
#Enterprise
#COBOL
#EnterpriseServer
#Server