>>The following performs the operation with a single PARSE: It can be done without the value SPACE
STR = "WORD1 WORD2.WORD3 WORD4:WORD5.WORD6 WORD7 HH.MM.SS" PARSE VAR STR VAR1 ' ' VAR2 ' ' VAR3 ' ' VAR4 ' ' VAR5 '.' VAR6 '.' VAR7 Thanks, Kolusu From: Paul Gilmartin <[email protected]> To: [email protected] Date: 02/24/2017 11:08 AM Subject: Re: Friday fun with REXX and PARSE Sent by: IBM Mainframe Discussion List <[email protected]> On Fri, 24 Feb 2017 06:53:54 -0500, Tony Thigpen wrote: >Steve has it right. Literals take precedent. So it works like this: > >Step 1) split as Temp1 '.' Temp2 '.' Temp3 > ... >Step 2) split the "temps" based on the parsing between literals: > ... > The following performs the operation with a single PARSE: 18 *-* parse value space( INPUT ) with var1 " " var2 " " var3 " " var4 " " var5 "." var6 "." var7 >V> " word1 word2.word3 word4:word5.word6 word7 hh.mm.ss " >>> "word1" >>> "word2.word3" >>> "word4:word5.word6" >>> "word7" >>> "hh" >>> "mm" >>> "ss" -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
