Rational Developer for System z
PL/I for Windows, Version 8.0, Programming Guide

DISPLAY statement input and output

The REPLY in DISPLAY is read from stdin. Output from the DISPLAY statement is directed to stdout by default. The syntax of the IBM.DISPLAY environment variable is:

Read syntax diagramSkip visual syntax diagram                .-std-.
>>-IBM.DISPLAY=-+-con-+----------------------------------------><
 
std
Specifies that the DISPLAY statement is to be associated with the standard output device. This is the default.
con
Specifies that the DISPLAY statement is to be associated with the CON device.

You can redirect display statements to a file, for example:

set ibm.display=std

  Hello: proc options(main);
    display('Hello!');
  end;

After compiling and linking the program, you could invoke it from the command line by entering:

  hello > hello1.out

The greater than sign redirects the output to the file that is specified after it, in this case HELLO1.OUT. This means that the word 'HELLO' is written in the file HELLO1.OUT.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)