Characters Input to a program

When reading input or passing input from another program, the language processor also changes alphabetic characters to uppercase before processing them. To prevent translation to uppercase, use the PARSE instruction.

For example, the following program reads input from the terminal and sends this information to the terminal output device.
Figure 1. Example of Reading Input and Writing Output
 /************************** REXX ***********************************/
 /* This REXX program gets the name of an animal from the input     */
 /* stream and sends it to the terminal.                            */
 /*******************************************************************/

 PULL animal                    /* Get the animal name.*/
 SAY animal
If the input is tyrannosaurus, the language processor produces the output:
TYRANNOSAURUS
To cause the language processor to read input exactly as it is presented, use the PARSE PULL instruction instead of the PULL instruction.
PARSE PULL animal
Now if the input is TyRannOsauRus, the output is:
TyRannOsauRus

Reference Reference

Feedback


Timestamp icon Last updated: Tuesday, 7 January 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic/com.ibm.cics.rexx.doc//dfhrx/dfhrx00020.html