String

If you use a string in a template, parsing checks the input data for a matching string. When assigning data into variables, parsing generally skips over the part of the input string that matches the string in the template.
phrase = 'To be, or not to be?'     /* phrase containing comma   */
PARSE VAR phrase part1 ',' part2    /* template containing comma */
                                    /*   as string separator     */
      /* part1 contains 'To be'          */
      /* part2 contains ' or not to be?' */

In this example, notice that the comma is not included with 'To be' because the comma is the string separator. (Notice also that part2 contains a value that begins with a blank. Parsing splits the input string at the matching text. It puts data up to the start of the match in one variable and data starting after the match in the next 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/dfhrx00063.html