PARSE VALUE … WITH Instruction

The PARSE VALUE…WITH instruction parses a specified expression, such as a literal string, into one or more variables whose names follow the WITH subkeyword.
PARSE VALUE 'Knowledge is power.' WITH word1 word2 word3
      /* word1 contains 'Knowledge'  */
      /* word2 contains 'is'         */
      /* word3 contains 'power.'     */
PARSE VALUE does not uppercase character information before assigning it into variables. If you want uppercase translation, use PARSE UPPER VALUE. You could use a variable instead of a string in PARSE VALUE (you would first assign the variable the value):
string='Knowledge is power.'
PARSE VALUE string WITH word1 word2 word3
      /* word1 contains 'Knowledge'  */
      /* word2 contains 'is'         */
      /* word3 contains 'power.'     */
Or you can use PARSE VAR to parse a variable.

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