PULL Instruction

Other chapters show PULL as an instruction that reads input and assigns it to one or more variables. If the program stack contains information, the PULL instruction takes information from the program stack. When the program stack is empty, PULL takes information from the current terminal input device. See section Getting Information from the Program Stack or Terminal Input Device for information about the data stack.
/* This REXX program parses the string "Knowledge is power."       */
  PULL word1 word2 word3
        /* word1 contains 'KNOWLEDGE'  */
        /* word2 contains 'IS'         */
        /* word3 contains 'POWER.'     */
PULL uppercases character information before assigning it into variables. If you do not want uppercase translation, use the PARSE PULL instruction.
/* This REXX program parses the string: "Knowledge is power."      */
  PARSE PULL word1 word2 word3
        /* word1 contains 'Knowledge'  */
        /* word2 contains 'is'         */
        /* word3 contains 'power.'     */

You can include the optional keyword UPPER on any variant of the PARSE instruction.This causes the language processor to uppercase character information before assigning it into variables. For example, using PARSE UPPER PULL… gives the same result as using PULL.


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/dfhrx00060.html