writeStdout()

The sysLib.writeStdout() system function writes a text string to the standard output device.

sysLib.writeStdout() is typically used for debugging.

Syntax

  sysLib.writeStdout(text STRING in)
text
Input can be any variable or expression that is assignment compatible with the STRING type.

Example

In the following example, the function sends a comment to the console to help debug a program.

 sysLib.writeStdout("Opened file");

Compatibility

Table 1. Compatibility considerations for writeStdout
Platform Issue
Java™ generation The output of the function goes to the System.out output stream of the JVM. The default is to route the output to the console. However, when you start the JVM, you can route the output to a different location.
COBOL generation sysLib.writeStdout() uses the COBOL DISPLAY statement to write output, which goes to the destination also used for sysLib.writeStderr().
CICS® All output is displayed on a JES output stream, and output from different transactions is intermingled.
IMS/VS The output destination is the DDNAME that you specify in the COBOL compiler option OUTDD. By default, the output is written to the DDNAME SYSOUT in the job that starts the message region.
iSeries® COBOL DISPLAY output goes to the QPRINT queue.

z/OS batch
IMS BMP

The output destination is the DDNAME that you specify in the COBOL compiler option OUTDD. By default, the output is written to the DDNAME SYSOUT in the JCL that starts the run unit.
zSeries® COBOL Ensure that you have specified the correct CODEPAGE compiler option for your language so the text displays properly. Set the code page compiler option in one of the following ways:
  • In the build server JCL as a COBOL compiler parameter
  • During COBOL compiler setup
  • In EGL

Feedback