Path: utzoo!utgpu!watserv1!watmath!att!att!linac!uwm.edu!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!psuvax1!psuvm!cunyvm!rohvm1!madif From: MADIF@ROHVM1.BITNET (Jim Foster) Newsgroups: comp.lang.rexx Subject: Re: Question about Parsing Message-ID: <90332.090459MADIF@ROHVM1.BITNET> Date: 28 Nov 90 14:04:59 GMT References: <9304@ncar.ucar.edu> Organization: Rohm and Haas Company Lines: 35 In article <9304@ncar.ucar.edu>, tparker@bierstadt.scd.ucar.edu (Tom Parker) says: > >Here's a question regarding PARSEing in REXX on VM/CMS: > >In parsing, I know you can use a string pattern in a variable, by putting >it in parentheses. For example: > > slash = '/' > parse value 'dog/cat' with word1 (slash) word2 > >But I can't find how to use a NUMERIC pattern in a variable. For >example, I might want to break a string at a specific column determined >by the program. Simplistic example: > > column = 4 > parse value 'dog/cat' with word1 (column) word2 > >will use '4' as a string pattern, rather than as a number pattern. > > >So, my question is: is there a way to use a numeric pattern in a variable >when parsing? > Put an "=" sign in front of the parentheses. I think you need REXX v4 to do this. column = 4 parse value 'dog/cat' with word1 =(column) word2 For more information, see Cowlishaw, second edition, page 119. -- Jim Foster - MADIF@ROHVM1.BITNET Rohm and Haas Company Systems Programmer Independence Mall West (215) 592-2446, 592-3377 (FAX) Philadelphia, PA 19105